<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Canvas> <Rectangle Canvas.Left="50" Canvas.Top="50" Width="40" Height="10" Fill="Red" /> <Rectangle Canvas.Left="50" Canvas.Top="50" Width="40" Height="10" Fill="Black"> <Rectangle.RenderTransform> <RotateTransform Angle="45" /> </Rectangle.RenderTransform> </Rectangle> </Canvas> </Page>