RectangleGeometry vs Rectangle
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Fun with Panels!" Height="313" Width="532">
<Canvas>
<Rectangle Fill="Gray" Stroke="Blue" StrokeThickness="2" Width="10"
Height="20" />
<Path Fill="Gray" Stroke="Blue" StrokeThickness="2">
<Path.Data>
<RectangleGeometry Rect="0,0,10,20" />
</Path.Data>
</Path>
</Canvas>
</Window>
Related examples in the same category