<Application 
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
   x:Class="Microsoft.Samples.BrushExamples.MyApp"
   Startup="myAppStartup">   
   <Application.Resources>

      <DrawingGroup x:Key="TriangularTile">


        <DrawingGroup>
        <GeometryDrawing Geometry="M0,0 L50,0 0,50Z" Brush="#CCCCFF" />
        
          

        </DrawingGroup> 

        <GeometryDrawing Geometry="M1,1 L49,1 1,49Z">
          <GeometryDrawing.Pen>
            <Pen Thickness="2" Brush="Black" MiterLimit="0" />
          </GeometryDrawing.Pen>
          
        </GeometryDrawing>      

      </DrawingGroup>


            <DrawingGroup x:Key="TestPatternDrawing">
                  <DrawingGroup.Children>
                    <GeometryDrawing 
                      Brush="LightGray">
                      <GeometryDrawing.Geometry>
                        <RectangleGeometry Rect="0,0 100,100" />
                      </GeometryDrawing.Geometry>
                    </GeometryDrawing>

                    <GeometryDrawing 
                      Brush="#22000000">
                      <GeometryDrawing.Geometry>
                        <GeometryGroup>
                          <RectangleGeometry Rect="0,0 50,50" />
                          <RectangleGeometry Rect="50,50 50,50" />
                        </GeometryGroup>
                      </GeometryDrawing.Geometry>
                    </GeometryDrawing>
                    
                    
                    <GeometryDrawing >
                      <GeometryDrawing.Geometry>
                        <RectangleGeometry Rect="0,0 100,100" />
                      </GeometryDrawing.Geometry>

                      <GeometryDrawing.Brush>
                        <RadialGradientBrush RadiusX="5" RadiusY="5"
                          Center="50,50" GradientOrigin="50,50"
                          MappingMode="Absolute"
                          SpreadMethod="Reflect">
                          <GradientStop Offset="0.0" Color="Gray" />
                          <GradientStop Offset="0.25" Color="Transparent" />
                        </RadialGradientBrush>
                      </GeometryDrawing.Brush>                      
                    </GeometryDrawing>
                    
                    <GeometryDrawing >
                      <GeometryDrawing.Geometry>
                        <RectangleGeometry Rect="0,0 100,100" />
                      </GeometryDrawing.Geometry>

                      <GeometryDrawing.Brush>
                        <DrawingBrush Viewport="0,0,0.1,0.1" TileMode="Tile">
                          <DrawingBrush.Drawing>
                    <GeometryDrawing Brush="Gray">
                      <GeometryDrawing.Geometry>
                        <GeometryGroup>
                          <RectangleGeometry Rect="0,0 1,50" />
                          <RectangleGeometry Rect="1,0 40,1" />
                        </GeometryGroup>
                      </GeometryDrawing.Geometry>                    
                    </GeometryDrawing>
                          </DrawingBrush.Drawing>
                        </DrawingBrush>
                      </GeometryDrawing.Brush>                      
                    </GeometryDrawing>                    
                    


                                        
                    
                    

                    
                    <GeometryDrawing Geometry="M0,10 L10,0 100,90, 90,100z"
                      Brush="Black" />
                    <GeometryDrawing Geometry="M90,0 L100,10 10,100 0,90z"
                      Brush="Black" />
                      
                    <GeometryDrawing>
                      <GeometryDrawing.Geometry>
                        <GeometryGroup>
                          <RectangleGeometry Rect="0,45 100,10" />
                          <RectangleGeometry Rect="45,0 10,100" />                       
                        </GeometryGroup>
                        
                      </GeometryDrawing.Geometry>
                        <GeometryDrawing.Brush>
                          <RadialGradientBrush>
                            <GradientStop Offset="0.5" Color="White" />
                            <GradientStop Offset="1.0" Color="Transparent" />
                          </RadialGradientBrush>
                          
                          
                        </GeometryDrawing.Brush>                      
                    </GeometryDrawing>  

                    <GeometryDrawing>
                      <GeometryDrawing.Geometry>
                        <GeometryGroup>
                        <GeometryGroup>
                          <RectangleGeometry Rect="0,45 100,10" />
                          <RectangleGeometry Rect="45,0 10,100" />  
                          <GeometryGroup.Transform>
                            <RotateTransform Angle="22.5" CenterX="50" CenterY="50" />
                          </GeometryGroup.Transform>
                        </GeometryGroup>
                        <GeometryGroup>
                          <RectangleGeometry Rect="0,45 100,10" />
                          <RectangleGeometry Rect="45,0 10,100" />  
                          <GeometryGroup.Transform>
                            <RotateTransform Angle="-22.5" CenterX="50" CenterY="50" />
                          </GeometryGroup.Transform>
                        </GeometryGroup>                        
                        </GeometryGroup>
                        
                      </GeometryDrawing.Geometry>
                        <GeometryDrawing.Brush>
                          <RadialGradientBrush>
                            <GradientStop Offset="0.5" Color="Gray" />
                            <GradientStop Offset="1.0" Color="Transparent" />
                          </RadialGradientBrush>
                          
                          
                        </GeometryDrawing.Brush>                      
                    </GeometryDrawing>  
                    
     
                    <GeometryDrawing 
                        Brush="#99FFFFFF">
                        <GeometryDrawing.Geometry>
                          <GeometryGroup>
                            <RectangleGeometry Rect="25,25 50,50" />                     
                          </GeometryGroup>
                        </GeometryDrawing.Geometry>
                      </GeometryDrawing>                    
                    

                      
                    

                    <DrawingGroup>  
                    
               

                      <GeometryDrawing>
                        <GeometryDrawing.Geometry>
                        
                        
                          <GeometryGroup>
                          
                          <PathGeometry Figures="M25,25 75,25, 50,10"> 
                            <PathGeometry.Transform>
                              <RotateTransform Angle="0" CenterX="50" CenterY="50" />
                            </PathGeometry.Transform>
                          </PathGeometry>  
                          
                          <PathGeometry Figures="M25,25 75,25, 50,10"> 
                            <PathGeometry.Transform>
                              <RotateTransform Angle="90" CenterX="50" CenterY="50" />
                            </PathGeometry.Transform>
                          </PathGeometry>                            
                          
                          <PathGeometry Figures="M25,25 75,25, 50,10"> 
                            <PathGeometry.Transform>
                              <RotateTransform Angle="180" CenterX="50" CenterY="50" />
                            </PathGeometry.Transform>
                          </PathGeometry>                        
                           <PathGeometry Figures="M25,25 75,25, 50,10"> 
                            <PathGeometry.Transform>
                              <RotateTransform Angle="270" CenterX="50" CenterY="50" />
                            </PathGeometry.Transform>
                          </PathGeometry>
                          </GeometryGroup>
                        </GeometryDrawing.Geometry>   
                        
                        <GeometryDrawing.Brush>
                          <RadialGradientBrush>
                            <GradientStop Offset="0.5" Color="#3333ff" />
                            <GradientStop Offset="1.0" Color="Transparent" />
                          </RadialGradientBrush>
                        </GeometryDrawing.Brush>
                      </GeometryDrawing>  

                      <GeometryDrawing>
                        <GeometryDrawing.Geometry>
                        
                        
                          <GeometryGroup>
                          
                          <PathGeometry Figures="M25,25 75,25, 50,10"> 
                            <PathGeometry.Transform>
                              <RotateTransform Angle="0" CenterX="50" CenterY="50" />
                            </PathGeometry.Transform>
                          </PathGeometry>  
                          
                          <PathGeometry Figures="M25,25 75,25, 50,10"> 
                            <PathGeometry.Transform>
                              <RotateTransform Angle="90" CenterX="50" CenterY="50" />
                            </PathGeometry.Transform>
                          </PathGeometry>                            
                          
                          <PathGeometry Figures="M25,25 75,25, 50,10"> 
                            <PathGeometry.Transform>
                              <RotateTransform Angle="180" CenterX="50" CenterY="50" />
                            </PathGeometry.Transform>
                          </PathGeometry>                        
                           <PathGeometry Figures="M25,25 75,25, 50,10"> 
                            <PathGeometry.Transform>
                              <RotateTransform Angle="270" CenterX="50" CenterY="50" />
                            </PathGeometry.Transform>
                          </PathGeometry>
                          <GeometryGroup.Transform>
                            <RotateTransform Angle="45" CenterX="50" CenterY="50" />
                          </GeometryGroup.Transform>
                          </GeometryGroup>
                        </GeometryDrawing.Geometry>   
                        
                        <GeometryDrawing.Brush>
                          <RadialGradientBrush>
                            <GradientStop Offset="0.5" Color="#3333ff" />
                            <GradientStop Offset="1.0" Color="Transparent" />
                          </RadialGradientBrush>
                        </GeometryDrawing.Brush>
                      </GeometryDrawing>                        
                    
                    
                      <GeometryDrawing 
                        Brush="White">
                        <GeometryDrawing.Geometry>
                          <GeometryGroup>
                            <RectangleGeometry Rect="40,40 20,20" />                     
                          </GeometryGroup>
                        </GeometryDrawing.Geometry>
                      </GeometryDrawing> 


                      
                    

                    </DrawingGroup>

                     <GeometryDrawing 
                        Brush="White">
                        <GeometryDrawing.Geometry>
                          <GeometryGroup>
                            <EllipseGeometry Center="10,10" RadiusX="5" RadiusY="5" />                     
                          </GeometryGroup>
                        </GeometryDrawing.Geometry>
                      </GeometryDrawing>                     
 
                     <GeometryDrawing 
                        Brush="White">
                        <GeometryDrawing.Geometry>
                          <GeometryGroup>
                            <EllipseGeometry Center="90,10" RadiusX="5" RadiusY="5" />                     
                          </GeometryGroup>
                        </GeometryDrawing.Geometry>
                      </GeometryDrawing>    


                     <GeometryDrawing 
                        Brush="White">
                        <GeometryDrawing.Geometry>
                          <GeometryGroup>
                            <EllipseGeometry Center="10,90" RadiusX="5" RadiusY="5" />                     
                          </GeometryGroup>
                        </GeometryDrawing.Geometry>
                      </GeometryDrawing>    
                      
                     <GeometryDrawing 
                        Brush="White">
                        <GeometryDrawing.Geometry>
                          <GeometryGroup>
                            <EllipseGeometry Center="90,90" RadiusX="5" RadiusY="5" />                     
                          </GeometryGroup>
                        </GeometryDrawing.Geometry>
                      </GeometryDrawing>                          
 
                    
                  </DrawingGroup.Children>
                </DrawingGroup>


     <DrawingImage x:Key="GeometricImage">
       <DrawingImage.Drawing>
         <DrawingGroup>

           <GeometryDrawing Brush="Black">
             <GeometryDrawing.Geometry>
               <RectangleGeometry Rect="0,0, 100,100">

               </RectangleGeometry>
             </GeometryDrawing.Geometry>
           </GeometryDrawing>

           <GeometryDrawing Brush="#CCCCFF">
             <GeometryDrawing.Geometry>
               <RectangleGeometry Rect="5,5, 90,90">

               </RectangleGeometry>
             </GeometryDrawing.Geometry>
           </GeometryDrawing>

           <GeometryDrawing Brush="Black">
             <GeometryDrawing.Geometry>
               <RectangleGeometry Rect="0,45, 100,10">
                 <RectangleGeometry.Transform>
                   <RotateTransform CenterX="50" CenterY="50" Angle="45" />
                 </RectangleGeometry.Transform>
               </RectangleGeometry>
             </GeometryDrawing.Geometry>
           </GeometryDrawing>
           <GeometryDrawing Brush="Black">
             <GeometryDrawing.Geometry>
               <RectangleGeometry Rect="0,45, 100,10">
                 <RectangleGeometry.Transform>
                   <RotateTransform CenterX="50" CenterY="50" Angle="-45" />
                 </RectangleGeometry.Transform>
               </RectangleGeometry>
             </GeometryDrawing.Geometry>
           </GeometryDrawing>

           <DrawingGroup>
             <GeometryDrawing Brush="Black">
               <GeometryDrawing.Geometry>
                 <RectangleGeometry Rect="25,25, 50,50">
                   <RectangleGeometry.Transform>
                     <RotateTransform CenterX="50" CenterY="50" Angle="45" />
                   </RectangleGeometry.Transform>
                 </RectangleGeometry>
               </GeometryDrawing.Geometry>
             </GeometryDrawing>
             <DrawingGroup.BitmapEffect>
               <BevelBitmapEffect />
             </DrawingGroup.BitmapEffect>
           </DrawingGroup>
         </DrawingGroup>
       </DrawingImage.Drawing>
     </DrawingImage>


     <Style TargetType="{x:Type TextBlock}">
       <Setter Property="FontSize" Value="10pt" />
       <Setter Property="FontFamily" Value="Verdana" />
     </Style>
     
 <LinearGradientBrush x:Key="GrayBlueGradientBrush" StartPoint="0,0" EndPoint="1,1">
      <LinearGradientBrush.GradientStops>
        <GradientStop Color="DarkGray" Offset="0" />
        <GradientStop Color="#CCCCFF" Offset="0.5" />
        <GradientStop Color="DarkGray" Offset="1" />
      </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>


    <LinearGradientBrush x:Key="MyGlassBrushResource" StartPoint="0,0" EndPoint="1,1" Opacity="0.75">
      <LinearGradientBrush.GradientStops>
        <GradientStop Color="WhiteSmoke" Offset="0.2" />
        <GradientStop Color="Transparent" Offset="0.4" />
        <GradientStop Color="WhiteSmoke" Offset="0.5" />
        <GradientStop Color="Transparent" Offset="0.75" />
        <GradientStop Color="WhiteSmoke" Offset="0.9" />
        <GradientStop Color="Transparent" Offset="1" />
      </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>     
     
   </Application.Resources>
</Application>
