In the following:
<Rectangle Height="60" HorizontalAlignment="Left" Margin="50,100,0,0" Name="rectangle2" Stroke="Black" VerticalAlignment="Top" Width="60" > <Rectangle.RenderTransform> <TransformGroup> <RotateTransform Angle="45" CenterX="30" CenterY="30"/> </TransformGroup> </Rectangle.RenderTransform>
To rotate the rectangle in its center, I have to set CenterX and Y to half the size of the rectangle. Is there a way to do this in markup?
Something like CenterX = "{Binding Path = Width \ 2}"?
source share