title: Styling GridSplitter wpf C#
body: <p>i want to style my GridSplitter like adding dots on it (as found on <a href="http://msdn.microsoft.com/en-us/library/aa970265.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/aa970265.aspx</a>).</p>
  
  <p>i also want to change gridsplitter color on mouseOver, or apply Aero Theme.</p>
  
  <pre><code>&lt;Style x:Key="GridSplitterStyle1" TargetType="{x:Type GridSplitter}"&gt;
    &lt;Setter Property="Background"
            Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/&gt;
    &lt;Setter Property="PreviewStyle"&gt;
      &lt;Setter.Value&gt;
        &lt;Style&gt;
          &lt;Setter Property="Control.Template"&gt;
            &lt;Setter.Value&gt;
              &lt;ControlTemplate&gt;
                &lt;Rectangle Fill="#80000000"/&gt;
              &lt;/ControlTemplate&gt;
            &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
        &lt;/Style&gt;
      &lt;/Setter.Value&gt;
    &lt;/Setter&gt;
    &lt;Setter Property="Template"&gt;
      &lt;Setter.Value&gt;
        &lt;ControlTemplate TargetType="{x:Type GridSplitter}"&gt;
          &lt;Border Background="{TemplateBinding Background}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="{TemplateBinding BorderThickness}"/&gt;
        &lt;/ControlTemplate&gt;
      &lt;/Setter.Value&gt;
    &lt;/Setter&gt;
  &lt;/Style&gt;
  
  &lt;!--Theme--&gt;
  &lt;ResourceDictionary.MergedDictionaries&gt;
    &lt;ResourceDictionary 
     Source="/RibbonControlsLibrary;component/Themes/Office2007Blue.xaml" /&gt;
  &lt;/ResourceDictionary.MergedDictionaries&gt;
  
  &lt;GridSplitter x:Name="gridSplitterTreeNodes" Width="10"
                BorderThickness="1,0" Cursor="SizeWE"
                RenderTransformOrigin="-1.2,0.507" ShowsPreview="True" 
                Style="{DynamicResource GridSplitterStyle1}"&gt;
    &lt;GridSplitter.Background&gt;
      &lt;LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"&gt;
        &lt;GradientStop Color="#FFE3EFFF" Offset="0"/&gt;
        &lt;GradientStop Color="#FFAFD2FF" Offset=".45"/&gt;
      &lt;/LinearGradientBrush&gt;
    &lt;/GridSplitter.Background&gt;
  &lt;/GridSplitter&gt;
  </code></pre>