cs代码实现控件移动TranslateTransform
xaml:
<Rectangle> <Rectangle.RenderTransform> <TranslateTransform x:Name="myTranslateTransform" /> </Rectangle.RenderTransform> </Rectangle>
cs:
myTranslateTransform.X = myTranslateTransform.X + 15; myTranslateTransform.Y = myTranslateTransform.Y + 15;
http://msdn.microsoft.com/en-us/library/windows/apps/system.windows.media.translatetransform%28v=vs.105%29.aspx