Thanks. this works good, but I need to do it all from c#. Can you show an
example of this from the button click event? I see plenty of xaml examples
online, but no c# examples of working with RotateTransform.
Thanks again.
"jacky kwok" <ja********@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
moondaddy wrote:
>I'm working in a WPF windows application and am wondering if it's
possible to rotate a Canvas or user control derived from Canvas. I
created a user control which derives from Canvas and I need to rotate it
90, 180, and 270 degrees. Is this possible and if so, how would I do it?
The use control lives in a main canvas.
Thanks.
Is such Xaml suitable your requirement?
<Canvas Width="200" Height="200" Background="Yellow">
<Canvas.RenderTransform>
<RotateTransform CenterX="100" CenterY="100" Angle="60" />
</Canvas.RenderTransform>
<Button Canvas.Left="50" Canvas.Top="50" >button1</Button>
</Canvas>
--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk