---
title: "Grid Splitter problem in WPF"  
description: "Grid Splitter problem in WPF"  
author: "Anonymous User"  
published: 2013-08-16  
updated: 2013-08-17  
canonical: https://www.mindstick.com/forum/1389/grid-splitter-problem-in-wpf  
category: "wpf"  
tags: ["wpf"]  
reading_time: 2 minutes  

---

# Grid Splitter problem in WPF

Hi [Developers](https://www.mindstick.com/articles/12875/blunders-you-must-avoid-while-hiring-java-developers-to-get-the-best-fulfilling-your-needs)!

I want a [layout](https://www.mindstick.com/articles/12853/android-layout-and-its-type) like VS 2008. In which I want two columns and [second](https://answers.mindstick.com/qa/41761/how-did-the-second-industrial-revolution-influence-women-s-roles-in-society) columns is again [split](https://www.mindstick.com/blog/11920/top-3-voltas-split-acs-for-your-home) into two.

I done that in the xaml mentioned below, but the GridSplitter is not visible vertically ( which split two columns).

I want both the GridSplitters to be resizable. One GridSplitter resizes the [Left](https://www.mindstick.com/articles/12768/don-t-be-left-behind-with-the-new-it-revolution) Hand Pane and [Right](https://www.mindstick.com/articles/12766/check-whether-you-are-doing-digital-transformation-right-or-not) Hand Pane and another GridSplitter resizes the subgrid's top pane and right pane.

The Second GridSplitter is working through this XAML but I am not able to [produce](https://yourviews.mindstick.com/view/83488/how-much-power-do-solar-panels-produce) XAML [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) that Splits the Right hand Pane and Left hand pane.Pleas Help!!

```
<Window x:Class="AlarmUI_2.Window1"        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        Title="Window1" Height="300" Width="300">    <Grid>        <Grid.ColumnDefinitions>            <ColumnDefinition Width="*"/>            <ColumnDefinition Width="*"/>        </Grid.ColumnDefinitions>        <StackPanel Background="Aqua" Grid.Column="0" >            <TextBlock FontSize="35" Foreground="#58290A"                       TextWrapping="Wrap">Left Hand Side</TextBlock>        </StackPanel>        <GridSplitter Grid.Column="0" ResizeDirection="Auto"                      Grid.RowSpan="1"                      HorizontalAlignment="Stretch"                      VerticalAlignment="Center"/>        <Grid Grid.Column="1">            <Grid.RowDefinitions>                           <RowDefinition Height="*" />                <RowDefinition Height="*" />            </Grid.RowDefinitions>            <ListBox Grid.Row="0" Background="Red">                <ListBoxItem>Hello</ListBoxItem>                <ListBoxItem>World</ListBoxItem>            </ListBox>            <GridSplitter Grid.Row="1" Height="5" Background="Gray"                          VerticalAlignment="Top" HorizontalAlignment="Stretch" />            <ListBox Grid.Row="1" Background="Violet" Margin="0,5,0,0">                <ListBoxItem>Hello</ListBoxItem>                <ListBoxItem>World</ListBoxItem>            </ListBox>        </Grid>    </Grid></Window>
```

Please help me!

## Replies

### Reply by shreesh chandra shukla

Hi!

Change your vertical Splitter to

```
<GridSplitter Grid.Column="0"
Width="5" ResizeDirection="Auto"            
Grid.RowSpan="1"            
HorizontalAlignment="Right"            
VerticalAlignment="Stretch"/> This will be much better way to use GridSplitter <Grid>   
<Grid.ColumnDefinitions>        <ColumnDefinition
Width="*"/>       
<ColumnDefinition Width="5"/>       
<ColumnDefinition Width="*"/>   
</Grid.ColumnDefinitions>     <StackPanel
Background="Aqua" Grid.Column="0" >        <TextBlock
FontSize="35" Foreground="#58290A"            TextWrapping="Wrap">Left Hand
Side</TextBlock>    
</StackPanel>    <GridSplitter
Grid.Column="1" HorizontalAlignment="Stretch"/>     <Grid
Grid.Column="2">       
<Grid.RowDefinitions>           
<RowDefinition Height="*" />           
<RowDefinition Height="5" />           
<RowDefinition Height="*" />       
</Grid.RowDefinitions>        <ListBox
Grid.Row="0" Background="Red">           
<ListBoxItem>Hello</ListBoxItem>           
<ListBoxItem>World</ListBoxItem>       
</ListBox>        <GridSplitter Grid.Row="1"
Background="Gray" HorizontalAlignment="Stretch"/>        <ListBox
Grid.Row="2" Background="Violet">           
<ListBoxItem>Hello</ListBoxItem>           
<ListBoxItem>World</ListBoxItem>       
</ListBox>    </Grid></Grid>
```


---

Original Source: https://www.mindstick.com/forum/1389/grid-splitter-problem-in-wpf

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
