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
posted @ 2014-09-16 10:43  Matthias  阅读(181)  评论(0编辑  收藏  举报