title: How to: Create a GridSplitter, that customizes the size of a DockPanel (C#, WPF)
body: <p><strong>How to: Create a GridSplitter, that customizes the size of a DockPanel (C#, WPF)</strong></p>
  
  <p>This is my <code>GridSplitter</code> code, but unfortunately it is not working: I am not allowed to change the size of my <code>grid</code>. I can see the <code>GridSplitter</code>, but I cannot use it.</p>
  
  <pre><code>&lt;DockPanel DockPanel.Dock="Left" Name="dockPanel_1" Width="200"&gt;
      &lt;StackPanel /&gt;
      &lt;DockPanel /&gt;
  &lt;/DockPanel&gt;
  &lt;Grid&gt;
      &lt;GridSplitter ShowsPreview="True" Width="5" HorizontalAlignment="Right" VerticalAlignment="Stretch" /&gt;
  &lt;/Grid&gt;
  &lt;DockPanel DockPanel.Dock="Right" Name="dockPanel_2"&gt;
      &lt;StackPanel /&gt;
      &lt;DockPanel /&gt;
  &lt;/DockPanel&gt;
  </code></pre>
  
  <p>PS: If you know how to save the changed size, so that its to the same size when restarting the application, just add to your post.</p>
  
  <p>Thanks in advance.</p>