<Window x:Class="Drawing.ImageBrushes"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ImageBrushes" Height="389.6" Width="419.6"
    >
    <Canvas>
      <Rectangle Canvas.Left="10" Canvas.Top="10"  Width="271" Height="100" Stroke="Black">
        <Rectangle.Fill>
          <ImageBrush ImageSource="logo.gif" Stretch="None"></ImageBrush>
        </Rectangle.Fill>
      </Rectangle>
      <Rectangle Canvas.Left="10" Canvas.Top="120" Width="200" Height="200" Stroke="Black">
        <Rectangle.Fill>
          <ImageBrush ImageSource="logo.gif" Stretch="Uniform"
    Viewbox="0.4 0.5 0.2 0.2"></ImageBrush>
        </Rectangle.Fill>
      </Rectangle>
    </Canvas>
</Window>
