GridSplitter as Entire Column or Row

image_pdfimage_print


   
       

<Window x:Class="SDKSample.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Row GridSplitter Example">


        <Grid >
            <Grid.RowDefinitions>
                <RowDefinition Height="150"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.Row="0" Grid.Column="0" Background="Blue"/>
            <GridSplitter Grid.Column="1"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Stretch"
                        Background="Black" 
                        ShowsPreview="True"
                        Width="5"
                        />
            <Grid Grid.Row="0" Grid.Column="2">
                <Grid.RowDefinitions>
                    <RowDefinition Height="50*" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="50*" />
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" Grid.Column="1" Background="Tan"/>
                <GridSplitter Grid.Row="1"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Center"
                          Background="Black" 
                          ShowsPreview="True"
                          Height="5"
                       />
                <StackPanel Grid.Row="2" Grid.Column="0" Background="Brown"/>
   

            </Grid>
        </Grid>



</Window>