开发者

xaml code works fine but code behind class's code doesn't work :(

This is my xaml code

<Canvas.RenderTransform>
   <TransformGroup>
         <ScaleTransform ScaleY="-1" /> 
         <TranslateTransform Y="300" />
   </TransformGroup>
</Canvas.RenderTransform>

I did the same thing in code behind class but the code doesn't give the开发者_JAVA技巧 expected result. Can someone please help me to convert this to C# code?

Regards, Rangana


TransformGroup tg = new TransformGroup();
tg.Children.Add(new ScaleTransform { ScaleY = -1 });
tg.Children.Add(new TranslateTransform { Y = 300 });

theCanvas.RenderTransform = tg;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜