WPF C#

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="GridSplitter Example">

  
    
    
    
    
  

  
    
    
    
  

  
    Row 0 Col 0
  
  
    Row 1 Col 0
  
  
    Row 2 Col 1
  
  
    Row 0 Col 1
  
  
    Row 1 Col 1
  
  
   Row 2 Col 1
  
  
    Row 0 Col 2
  
  
    Row 1 Col 2
  
  
    Row 2 Col 2
  
   
  
  
    Property Settings
    
      GridResizeBehavior
      
       BasedOnAlignment (default)
      
      
       CurrentAndNext
      
      
       PreviousAndCurrent
      
      
       PreviousAndNext
      
    
  


//File:Window.xaml.cs
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace GridSplitter_Example
{
  public partial class Window1 : Window
  {
      public Window1()
      {
        InitializeComponent();
      }
        private void ResizeBehaviorChanged(object sender, RoutedEventArgs e)
        {
          if ((Boolean)BehaviorBasedOnAlignment.IsChecked)
            myGridSplitter.ResizeBehavior = GridResizeBehavior.BasedOnAlignment;
          else if ((Boolean)BehaviorCurrentAndNext.IsChecked)
            myGridSplitter.ResizeBehavior = GridResizeBehavior.CurrentAndNext;
          else if ((Boolean)BehaviorPreviousAndCurrent.IsChecked)
            myGridSplitter.ResizeBehavior = GridResizeBehavior.PreviousAndCurrent;
          else if ((Boolean)BehaviorPreviousAndNext.IsChecked)
            myGridSplitter.ResizeBehavior = GridResizeBehavior.PreviousAndNext;
        }
  
  }
}