<Window x:Class="ResourcesExample.ReuseDrawingBrush"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ResourcesExample" Height="300" Width="300"
    >
  
  <!-- Example 12-19. Using a DrawingBrush resource -->
  
  <Window.Resources>
    <GeometryDrawing x:Key="drawing" Brush="Green">
      <GeometryDrawing.Geometry>
        <EllipseGeometry RadiusX="200" RadiusY="10" />
      </GeometryDrawing.Geometry>
    </GeometryDrawing>
    <DrawingBrush x:Key="dbrush" Drawing="{StaticResource drawing}" />
  </Window.Resources>

  <StackPanel Orientation="Vertical">
    <Rectangle Width="250" Height="50" Fill="{StaticResource dbrush}" />
    <Rectangle Width="250" Height="50" Fill="{StaticResource dbrush}" />
  </StackPanel>

  <!-- End of Example 12-19. -->

</Window>
