<Page 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <Page.Resources>
    <DrawingBrush x:Key="OpMask1">
      <DrawingBrush.Drawing>

        <DrawingGroup>
          <GeometryDrawing Brush="#FF000000">
            <GeometryDrawing.Geometry>
              <RectangleGeometry Rect="0,0,30,100" />
            </GeometryDrawing.Geometry>
          </GeometryDrawing>

          <GeometryDrawing>
            <GeometryDrawing.Geometry>
              <RectangleGeometry Rect="30,0,70,100" />
            </GeometryDrawing.Geometry>
            <GeometryDrawing.Brush>

              <RadialGradientBrush>
                <RadialGradientBrush.GradientStops>
                  <GradientStop Offset="0.0" Color="#FF000000" />
                  <GradientStop Offset="0.45" Color="#FF000000" />
                  <GradientStop Offset="0.55" Color="#00000000" />
                  <GradientStop Offset="0.65" Color="#FF000000" />
                  <GradientStop Offset="0.75" Color="#00000000" />
                  <GradientStop Offset="0.90" Color="#00000000" />
                  <GradientStop Offset="1.0" Color="#FF000000" />
                </RadialGradientBrush.GradientStops>
              </RadialGradientBrush>
            </GeometryDrawing.Brush>
          </GeometryDrawing>
        </DrawingGroup>
      </DrawingBrush.Drawing>

    </DrawingBrush>

    <DrawingBrush x:Key="OpMask3">
      <DrawingBrush.Drawing>

        <DrawingGroup>
          <GeometryDrawing Brush="#FF000000">
            <GeometryDrawing.Geometry>
              <RectangleGeometry Rect="0,0,30,100" />
            </GeometryDrawing.Geometry>
          </GeometryDrawing>

          <GeometryDrawing>
            <GeometryDrawing.Geometry>
              <RectangleGeometry Rect="30,0,70,100" />
            </GeometryDrawing.Geometry>
            <GeometryDrawing.Brush>

              <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
                <LinearGradientBrush.GradientStops>

                  <GradientStop Offset="0.4" Color="#FF000000" />
                  <GradientStop Offset="0.75" Color="#00000000" />

                  <GradientStop Offset="1.0" Color="#FF000000" />
                </LinearGradientBrush.GradientStops>
              </LinearGradientBrush>
            </GeometryDrawing.Brush>
          </GeometryDrawing>
        </DrawingGroup>
      </DrawingBrush.Drawing>

    </DrawingBrush>

    <DrawingBrush x:Key="OpMask4">
      <DrawingBrush.Drawing>

        <DrawingGroup>

          <GeometryDrawing Brush="White">
            <GeometryDrawing.Geometry>
              <RectangleGeometry Rect="0,0,100,10" />
            </GeometryDrawing.Geometry>
          </GeometryDrawing>

          <GeometryDrawing Brush="#FF000000">
            <GeometryDrawing.Geometry>
              <RectangleGeometry Rect="0,20,30,80" />
            </GeometryDrawing.Geometry>
          </GeometryDrawing>

          <GeometryDrawing Brush="White">
            <GeometryDrawing.Geometry>
              <GeometryGroup>
                <RectangleGeometry Rect="35,25, 20,20" />
                <RectangleGeometry Rect="35,50, 20,20" />
                <RectangleGeometry Rect="35,75, 20,20" />

                <RectangleGeometry Rect="60,25, 10,20" />
                <RectangleGeometry Rect="60,50, 10,20" />
                <RectangleGeometry Rect="60,75, 10,20" />


                <RectangleGeometry Rect="75,25, 20,20" />
                <RectangleGeometry Rect="75,50, 20,20" />
                <RectangleGeometry Rect="75,75, 20,20" />
              </GeometryGroup>
            </GeometryDrawing.Geometry>
          </GeometryDrawing>
        </DrawingGroup>
      </DrawingBrush.Drawing>

    </DrawingBrush>

    <DrawingBrush x:Key="OpMask2">
      <DrawingBrush.Drawing>

        <DrawingGroup>
          <GeometryDrawing Brush="#FF000000">
            <GeometryDrawing.Geometry>
              <RectangleGeometry Rect="0,0,30,100" />
            </GeometryDrawing.Geometry>
          </GeometryDrawing>

          <GeometryDrawing Brush="{StaticResource CheckerBrushResource2}">
            <GeometryDrawing.Geometry>
              <RectangleGeometry Rect="30,0,70,100" />
            </GeometryDrawing.Geometry>
          </GeometryDrawing>

        </DrawingGroup>
      </DrawingBrush.Drawing>

    </DrawingBrush>

  </Page.Resources>

  <StackPanel Margin="20" Orientation="Horizontal" Background="{StaticResource CheckerBrushResource}"
    HorizontalAlignment="Left" VerticalAlignment="Top">


    <Border BorderBrush="Gray" BorderThickness="1" 
      HorizontalAlignment="Left" VerticalAlignment="Top"
      Margin="10,10,0,10">
      <Image Stretch="None" HorizontalAlignment="Left">
        <Image.Source>
          <DrawingImage>
            <DrawingImage.Drawing>
              <DrawingGroup>
                <DrawingGroup.Children>
                  <ImageDrawing ImageSource="sampleImages\kiwi.png" Rect="0,0,100,100" />

                  <GeometryDrawing Brush="Black">
                    <GeometryDrawing.Geometry>
                      <RectangleGeometry Rect="0,20,30,80" />
                    </GeometryDrawing.Geometry>
                  </GeometryDrawing>
                  <GeometryDrawing Brush="White">
                    <GeometryDrawing.Geometry>
                      <GeometryGroup>

                        <RectangleGeometry Rect="5,25, 20,20" />
                        <RectangleGeometry Rect="5,50, 20,20" />
                        <RectangleGeometry Rect="5,75, 20,20" />
                      </GeometryGroup>
                    </GeometryDrawing.Geometry>


                  </GeometryDrawing>
                </DrawingGroup.Children>
              </DrawingGroup>
            </DrawingImage.Drawing>
          </DrawingImage>
        </Image.Source>
      </Image>
    </Border>




    <Border BorderBrush="Gray" BorderThickness="1" 
      HorizontalAlignment="Left" VerticalAlignment="Top"
      Margin="10,10,0,10">
      <Image Stretch="None" HorizontalAlignment="Left">
        <Image.Source>
          <DrawingImage>
            <DrawingImage.Drawing>

              <!-- OpacityMask -->
              <DrawingGroup OpacityMask="{StaticResource OpMask2}">
                <DrawingGroup.Children>

                  <ImageDrawing ImageSource="sampleImages\kiwi.png" Rect="0,0,100,100" />

                  <GeometryDrawing Brush="Black">
                    <GeometryDrawing.Geometry>
                      <RectangleGeometry Rect="0,20,30,80" />
                    </GeometryDrawing.Geometry>
                  </GeometryDrawing>
                  <GeometryDrawing Brush="White">
                    <GeometryDrawing.Geometry>
                      <GeometryGroup>

                        <RectangleGeometry Rect="5,25, 20,20" />
                        <RectangleGeometry Rect="5,50, 20,20" />
                        <RectangleGeometry Rect="5,75, 20,20" />
                      </GeometryGroup>
                    </GeometryDrawing.Geometry>


                  </GeometryDrawing>

                </DrawingGroup.Children>
              </DrawingGroup>
            </DrawingImage.Drawing>
          </DrawingImage>
        </Image.Source>
      </Image>
    </Border>


    <Border BorderBrush="Gray" BorderThickness="1" 
     HorizontalAlignment="Left" VerticalAlignment="Top"
     Margin="10,10,0,10">
      <Image Stretch="None" HorizontalAlignment="Left">
        <Image.Source>
          <DrawingImage>
            <DrawingImage.Drawing>

              <!-- OpacityMask + Opacity -->
              <DrawingGroup Opacity="0.75" OpacityMask="{StaticResource OpMask2}">
                <DrawingGroup.Children>

                  <ImageDrawing ImageSource="sampleImages\kiwi.png" Rect="0,0,100,100" />

                  <GeometryDrawing Brush="Black">
                    <GeometryDrawing.Geometry>
                      <RectangleGeometry Rect="0,20,30,80" />
                    </GeometryDrawing.Geometry>
                  </GeometryDrawing>
                  <GeometryDrawing Brush="White">
                    <GeometryDrawing.Geometry>
                      <GeometryGroup>

                        <RectangleGeometry Rect="5,25, 20,20" />
                        <RectangleGeometry Rect="5,50, 20,20" />
                        <RectangleGeometry Rect="5,75, 20,20" />
                      </GeometryGroup>
                    </GeometryDrawing.Geometry>


                  </GeometryDrawing>
                </DrawingGroup.Children>
              </DrawingGroup>
            </DrawingImage.Drawing>
          </DrawingImage>
        </Image.Source>
      </Image>
    </Border>


    <Border BorderBrush="Gray" BorderThickness="1" 
       HorizontalAlignment="Left" VerticalAlignment="Top"
       Margin="10,10,0,10">
      <Image Stretch="None" HorizontalAlignment="Left">
        <Image.Source>
          <DrawingImage>
            <DrawingImage.Drawing>

              <!-- OpacityMask + Opacity + BitmapEffect -->
              <DrawingGroup Opacity="0.75" OpacityMask="{StaticResource OpMask2}">
                <DrawingGroup.Children>

                  <ImageDrawing ImageSource="sampleImages\kiwi.png" Rect="0,0,100,100" />

                  <GeometryDrawing Brush="Black">
                    <GeometryDrawing.Geometry>
                      <RectangleGeometry Rect="0,20,30,80" />
                    </GeometryDrawing.Geometry>
                  </GeometryDrawing>
                  <GeometryDrawing Brush="White">
                    <GeometryDrawing.Geometry>
                      <GeometryGroup>

                        <RectangleGeometry Rect="5,25, 20,20" />
                        <RectangleGeometry Rect="5,50, 20,20" />
                        <RectangleGeometry Rect="5,75, 20,20" />
                      </GeometryGroup>
                    </GeometryDrawing.Geometry>


                  </GeometryDrawing>

                </DrawingGroup.Children>

                <DrawingGroup.BitmapEffect>
                  <BevelBitmapEffect />
                </DrawingGroup.BitmapEffect>

              </DrawingGroup>
            </DrawingImage.Drawing>
          </DrawingImage>
        </Image.Source>
      </Image>
    </Border>

    <Border BorderBrush="Gray" BorderThickness="1" 
        HorizontalAlignment="Left" VerticalAlignment="Top"
        Margin="10,10,0,10">
      <Image Stretch="None" HorizontalAlignment="Left">
        <Image.Source>
          <DrawingImage>
            <DrawingImage.Drawing>

              <!-- OpacityMask + Opacity + BitmapEffect + ClipGeometry -->
              <DrawingGroup Opacity="0.75" OpacityMask="{StaticResource OpMask2}">
                <DrawingGroup.Children>

                  <ImageDrawing ImageSource="sampleImages\kiwi.png" Rect="0,0,100,100" />
                  <GeometryDrawing Brush="Black">
                    <GeometryDrawing.Geometry>
                      <RectangleGeometry Rect="0,20,30,80" />
                    </GeometryDrawing.Geometry>
                  </GeometryDrawing>
                  <GeometryDrawing Brush="White">
                    <GeometryDrawing.Geometry>
                      <GeometryGroup>

                        <RectangleGeometry Rect="5,25, 20,20" />
                        <RectangleGeometry Rect="5,50, 20,20" />
                        <RectangleGeometry Rect="5,75, 20,20" />
                      </GeometryGroup>
                    </GeometryDrawing.Geometry>


                  </GeometryDrawing>

                </DrawingGroup.Children>

                <DrawingGroup.BitmapEffect>
                  <BevelBitmapEffect />
                </DrawingGroup.BitmapEffect>


                <DrawingGroup.ClipGeometry>
                  <PathGeometry Figures="M0,100 L50,0 100,100" />
                </DrawingGroup.ClipGeometry>

              </DrawingGroup>
            </DrawingImage.Drawing>
          </DrawingImage>
        </Image.Source>
      </Image>
    </Border>

    <Border BorderBrush="Gray" BorderThickness="1" 
           HorizontalAlignment="Left" VerticalAlignment="Top"
           Margin="10,10,0,10">
      <Image Stretch="None" HorizontalAlignment="Left">
        <Image.Source>
          <DrawingImage>
            <DrawingImage.Drawing>

              <!-- OpacityMask + Opacity + BitmapEffect + ClipGeometry + 
                       GuidelineSet -->
              <DrawingGroup Opacity="0.75" OpacityMask="{StaticResource OpMask2}">
                <DrawingGroup.Children>

                  <ImageDrawing ImageSource="sampleImages\kiwi.png" Rect="0,0,100,100" />

                  <GeometryDrawing Brush="Black">
                    <GeometryDrawing.Geometry>
                      <RectangleGeometry Rect="0,20,30,80" />
                    </GeometryDrawing.Geometry>
                  </GeometryDrawing>
                  <GeometryDrawing Brush="White">
                    <GeometryDrawing.Geometry>
                      <GeometryGroup>

                        <RectangleGeometry Rect="5,25, 20,20" />
                        <RectangleGeometry Rect="5,50, 20,20" />
                        <RectangleGeometry Rect="5,75, 20,20" />
                      </GeometryGroup>
                    </GeometryDrawing.Geometry>


                  </GeometryDrawing>
                </DrawingGroup.Children>

                <DrawingGroup.BitmapEffect>
                  <BevelBitmapEffect />
                </DrawingGroup.BitmapEffect>


                <DrawingGroup.ClipGeometry>
                  <PathGeometry Figures="M0,100 L50,0 100,100" />
                </DrawingGroup.ClipGeometry>


                <DrawingGroup.GuidelineSet>
                  <GuidelineSet GuidelinesX="5 25" GuidelinesY="25,50,75"
                        />
                </DrawingGroup.GuidelineSet>



              </DrawingGroup>
            </DrawingImage.Drawing>
          </DrawingImage>
        </Image.Source>
      </Image>
    </Border>



    <Border BorderBrush="Gray" BorderThickness="1" 
           HorizontalAlignment="Left" VerticalAlignment="Top"
           Margin="10,10,10,10">
      <Image Stretch="None" HorizontalAlignment="Left">
        <Image.Source>
          <DrawingImage>
            <DrawingImage.Drawing>

              <!-- OpacityMask + Opacity + BitmapEffect + ClipGeometry + 
                       GuidelineSet -->
              <DrawingGroup Opacity="0.75" OpacityMask="{StaticResource OpMask2}">
                <DrawingGroup.Children>

                  <ImageDrawing ImageSource="sampleImages\kiwi.png" Rect="0,0,100,100" />

                  <GeometryDrawing Brush="Black">
                    <GeometryDrawing.Geometry>
                      <RectangleGeometry Rect="0,20,30,80" />
                    </GeometryDrawing.Geometry>
                  </GeometryDrawing>
                  <GeometryDrawing Brush="White">
                    <GeometryDrawing.Geometry>
                      <GeometryGroup>

                        <RectangleGeometry Rect="5,25, 20,20" />
                        <RectangleGeometry Rect="5,50, 20,20" />
                        <RectangleGeometry Rect="5,75, 20,20" />
                      </GeometryGroup>
                    </GeometryDrawing.Geometry>


                  </GeometryDrawing>
                </DrawingGroup.Children>

                <DrawingGroup.BitmapEffect>
                  <BevelBitmapEffect />
                </DrawingGroup.BitmapEffect>

                <DrawingGroup.ClipGeometry>
                  <PathGeometry Figures="M0,100 L50,0 100,100" />
                </DrawingGroup.ClipGeometry>


                <DrawingGroup.GuidelineSet>
                  <GuidelineSet GuidelinesX="5 25" GuidelinesY="25,50,75"
                         />
                </DrawingGroup.GuidelineSet>

                <DrawingGroup.Transform>
                  <RotateTransform Angle="45" CenterX="50" CenterY="50" />
                </DrawingGroup.Transform>



              </DrawingGroup>
            </DrawingImage.Drawing>
          </DrawingImage>
        </Image.Source>
      </Image>
    </Border>




  </StackPanel>

</Page>
