Silverlight Binding to TranslateX

Posted by Peanut on Stack Overflow See other posts from Stack Overflow or by Peanut
Published on 2010-06-06T15:41:13Z Indexed on 2010/06/06 15:52 UTC
Read the original article Hit count: 489

Filed under:
|

I have a simple winphone7 application, but I think this would apply to any silverlight.

Basically I have an ellipse and I would like to move it with the translate X and Y properties. Here is my attempt:

<Ellipse Fill="#FFF4F4F5" Margin="0,0,-3,-3" Stroke="Black" RenderTransformOrigin="0.5,0.5" >
            <Ellipse.RenderTransform>
                <CompositeTransform TranslateY="{Binding Y}" TranslateX="{Binding X}"/>
            </Ellipse.RenderTransform>
</Ellipse>

I am pretty sure the Binding is set correctly; The problem is it gives me this error when I run the application:

2260 An error has occurred. [Line: 4 Position: 33]

which is a XAML error. The error goes away when I comment out the composittransform line.

Can anyone point me in a right direction? If you need more code let me know, i'll post more up.

Thanks

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about binding