<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
<Canvas>
<Rectangle Canvas.Left="80" Canvas.Top="70" Width="70" Height="40" Fill="Silver" />
<Rectangle Canvas.Left="80" Canvas.Top="80" Width="70" Height="40" Fill="Black">
<Rectangle.RenderTransform>
<RotateTransform Angle="45" />
</Rectangle.RenderTransform>
</Rectangle>
</Canvas>
</Window>
Main thing you need to define the rectangle coordinates and rotation angle.

Join the conversation! Your thoughts help the community grow.