title: How get this xaml to work from app.xaml
body: <p>I made this UpButton.xaml file by converting it from an .ai-file that our graphics guys made but i just can't get it to work.
  I was thinking of making this some sort of template/style for buttons, but our buttons are made up from rectangles and not the button object.</p>
  
  <p>I've been fiddling with this since last Thursday, googled and tried everything I found but it just won't work.</p>
  
  <p>we like to have this in a seperate xaml file as a 'Resource', then add that into app.xaml and let this paint all rectangles throughout the entire application.
  The application we're building are supposed to use xaml and as little C# coding as possible.</p>
  
  <p>Can anyone help me get this thing to work?</p>
  
  <p>thx for letting me know about the code Sample :)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;
      &lt;DrawingBrush x:Key="UnnamedObject0" Stretch="Uniform"&gt;
          &lt;DrawingBrush.Drawing&gt;
              &lt;DrawingGroup&gt;
                  &lt;DrawingGroup.Children&gt;
                      &lt;GeometryDrawing Geometry="F1 M 141.781,503.813C 140.737,503.813 139.891,504.659 139.891,505.703L 139.891,524.601C 139.891,525.645 140.737,526.491 141.781,526.491L 160.679,526.491C 161.723,526.491 162.568,525.645 162.568,524.601L 162.568,505.703C 162.568,504.659 161.723,503.813 160.679,503.813L 141.781,503.813 Z "&gt;
                          &lt;GeometryDrawing.Brush&gt;
                              &lt;LinearGradientBrush StartPoint="0.499992,-1.61488e-005" EndPoint="0.499992,1"&gt;
                                  &lt;LinearGradientBrush.GradientStops&gt;
                                      &lt;GradientStop Color="#FFD1D3D4" Offset="0"/&gt;
                                      &lt;GradientStop Color="#FFFFFFFF" Offset="1"/&gt;
                                  &lt;/LinearGradientBrush.GradientStops&gt;
                              &lt;/LinearGradientBrush&gt;
                          &lt;/GeometryDrawing.Brush&gt;
                      &lt;/GeometryDrawing&gt;
                      &lt;DrawingGroup ClipGeometry="F1 M 0,0L 793.701,0L 793.701,1122.52L 0,1122.52L 0,0 Z "&gt;
                          &lt;DrawingGroup.Children&gt;
                              &lt;GeometryDrawing Geometry="F1 M 139.891,505.703C 139.891,504.659 140.737,503.814 141.781,503.814L 160.679,503.814C 161.723,503.814 162.568,504.659 162.568,505.703L 162.568,524.6C 162.568,525.644 161.723,526.491 160.679,526.491L 141.781,526.491C 140.737,526.491 139.891,525.644 139.891,524.6L 139.891,505.703 Z "&gt;
                                  &lt;GeometryDrawing.Pen&gt;
                                      &lt;Pen Thickness="1.33333" LineJoin="Round" Brush="#FFA7A9AC"/&gt;
                                  &lt;/GeometryDrawing.Pen&gt;
                              &lt;/GeometryDrawing&gt;
                          &lt;/DrawingGroup.Children&gt;
                      &lt;/DrawingGroup&gt;
                      &lt;GeometryDrawing Geometry="F1 M 144.048,506.081C 143.005,506.081 142.159,506.927 142.159,507.969L 142.159,522.333C 142.159,523.377 143.005,524.223 144.048,524.223L 158.412,524.223C 159.455,524.223 160.301,523.377 160.301,522.333L 160.301,507.969C 160.301,506.927 159.455,506.081 158.412,506.081L 144.048,506.081 Z "&gt;
                          &lt;GeometryDrawing.Brush&gt;
                              &lt;LinearGradientBrush StartPoint="0.499951,1.00003" EndPoint="0.499951,-3.36442e-006"&gt;
                                  &lt;LinearGradientBrush.GradientStops&gt;
                                      &lt;GradientStop Color="#FFE6E8E8" Offset="0"/&gt;
                                      &lt;GradientStop Color="#FFFFFFFF" Offset="1"/&gt;
                                  &lt;/LinearGradientBrush.GradientStops&gt;
                              &lt;/LinearGradientBrush&gt;
                          &lt;/GeometryDrawing.Brush&gt;
                      &lt;/GeometryDrawing&gt;
                      &lt;GeometryDrawing Geometry="F1 M 144.645,515.816L 147.521,515.816L 147.521,521.56L 151.24,521.56L 154.939,521.56L 154.939,515.816L 157.813,515.816L 151.219,508.743L 144.645,515.816 Z "&gt;
                          &lt;GeometryDrawing.Brush&gt;
                              &lt;LinearGradientBrush StartPoint="0.499986,1.00003" EndPoint="0.499986,5.23812e-005"&gt;
                                  &lt;LinearGradientBrush.GradientStops&gt;
                                      &lt;GradientStop Color="#FF50C400" Offset="0"/&gt;
                                      &lt;GradientStop Color="#FF91F456" Offset="1"/&gt;
                                  &lt;/LinearGradientBrush.GradientStops&gt;
                              &lt;/LinearGradientBrush&gt;
                          &lt;/GeometryDrawing.Brush&gt;
                      &lt;/GeometryDrawing&gt;
                      &lt;DrawingGroup ClipGeometry="F1 M 0,0L 793.701,0L 793.701,1122.52L 0,1122.52L 0,0 Z "&gt;
                          &lt;DrawingGroup.Children&gt;
                              &lt;GeometryDrawing Geometry="F1 M 151.24,521.56L 147.521,521.56L 147.521,515.815L 144.646,515.815L 151.218,508.743L 157.814,515.815L 154.938,515.815L 154.938,521.56L 151.24,521.56 Z "&gt;
                                  &lt;GeometryDrawing.Pen&gt;
                                      &lt;Pen Thickness="1.33333" LineJoin="Round" Brush="#FF076F00"/&gt;
                                  &lt;/GeometryDrawing.Pen&gt;
                              &lt;/GeometryDrawing&gt;
                          &lt;/DrawingGroup.Children&gt;
                      &lt;/DrawingGroup&gt;
                  &lt;/DrawingGroup.Children&gt;
              &lt;/DrawingGroup&gt;
          &lt;/DrawingBrush.Drawing&gt;
      &lt;/DrawingBrush&gt;
  &lt;/ResourceDictionary&gt;
  </code></pre>