<!-- <SnippetGraphicsMMTileSizeExampleWholePage> -->
<Page
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="Microsoft.Samples.BrushExamples.TileSizeExample"
  WindowTitle="Tiling Example"
  Background="White" >

  <StackPanel Orientation="Vertical" Margin="20">



    <StackPanel Orientation="Horizontal">

      <Border BorderBrush="Black" BorderThickness="1" 
        Margin="0,0,10,0" VerticalAlignment="Top">

        <!-- <SnippetGraphicsMMRelativeViewportUnitsExample1> -->
        <Rectangle
         Width="50" Height="100">
          <Rectangle.Fill>

            <!-- Paints an area with 4 tiles. -->
            <ImageBrush ImageSource="sampleImages\cherries_larger.jpg"
              Viewport="0,0,0.5,0.5"
              ViewportUnits="RelativeToBoundingBox" 
              TileMode="Tile" />
          </Rectangle.Fill>
        </Rectangle>
        <!-- </SnippetGraphicsMMRelativeViewportUnitsExample1> -->
      </Border>

      <Border BorderBrush="Black" BorderThickness="1" 
        Margin="0,0,10,0" VerticalAlignment="Top">
        <Rectangle
         Width="200" Height="100">
          <Rectangle.Fill>
            <ImageBrush  ImageSource="sampleImages\cherries_larger.jpg"
              Viewport="0,0,0.5,0.5"
              ViewportUnits="RelativeToBoundingBox"
              TileMode="Tile" />
          </Rectangle.Fill>
        </Rectangle>
      </Border>

      <Border BorderBrush="Black" BorderThickness="1" 
        Margin="0,0,10,0" VerticalAlignment="Top">
        <Rectangle
         Width="200" Height="200">
          <Rectangle.Fill>
            <ImageBrush ImageSource="sampleImages\cherries_larger.jpg"
              Viewport="0,0,0.5,0.5"
              ViewportUnits="RelativeToBoundingBox"
              TileMode="Tile" />
          </Rectangle.Fill>
        </Rectangle>
      </Border>

    </StackPanel>


    <StackPanel Orientation="Horizontal">


      <Border BorderBrush="Black" BorderThickness="1" 
        Margin="0,0,10,0" VerticalAlignment="Top">

        <!-- <SnippetGraphicsMMAbsoluteViewportUnitsExample1> -->
        <Rectangle
         Width="50" Height="100">
          <Rectangle.Fill>

            <!-- Paints an area with 25 x 25 tiles. -->
            <ImageBrush ImageSource="sampleImages\cherries_larger.jpg"
              Viewport="0,0,25,25"
              ViewportUnits="Absolute" 
              TileMode="Tile" />
          </Rectangle.Fill>
        </Rectangle>
        <!-- </SnippetGraphicsMMAbsoluteViewportUnitsExample1> -->
      </Border>

      <Border BorderBrush="Black" BorderThickness="1" 
        Margin="0,0,10,0" VerticalAlignment="Top">
        <Rectangle
         Width="200" Height="100">
          <Rectangle.Fill>
            <ImageBrush ImageSource="sampleImages\cherries_larger.jpg"
              Viewport="0,0,25,25"
              ViewportUnits="Absolute" 
              TileMode="Tile" />
          </Rectangle.Fill>
        </Rectangle>
      </Border>

      <Border BorderBrush="Black" BorderThickness="1" 
        Margin="0,0,10,0" VerticalAlignment="Top">
        <Rectangle
         Width="200" Height="200">
          <Rectangle.Fill>
            <ImageBrush ImageSource="sampleImages\cherries_larger.jpg"
              Viewport="0,0,25,25"
              ViewportUnits="Absolute" 
              TileMode="Tile" />
          </Rectangle.Fill>
        </Rectangle>
      </Border>

    </StackPanel>



  </StackPanel>
</Page>
<!-- </SnippetGraphicsMMTileSizeExampleWholePage> -->