I’m trying to rotate this canvas
<Canvas Canvas.Left="203" Canvas.Top="274" Name="canvas1" Height="0" Width="0" >
<Rectangle.LayoutTransform>
<RotateTransform Angle="-45"/>
</Rectangle.LayoutTransform>
I want to rotate this canvas but in the same position.. check this image
The left image I dont want to do that.. I need to create the second one.. but always I need to set X, Y values? Or is there another way?
In WPF, has two properties to support display transformations,
LayoutTransformandRenderTransform.Any Transform assigned to LayoutTransform is applied when layout is performed. RenderTransform is applied after layout when rendering is performed.You need to change the Transformation to RenderTransform
You can see the difference between LayoutTransform and RenderTransform.