tags:

views:

92

answers:

1

Hi guys,

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 expected result. Can someone please help me to convert this to C# code?

Regards, Rangana

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

theCanvas.RenderTransform = tg;
itowlson