WPF: Something standard and similar to the `SplitContainer`?

Grid + GridSplitter at your service


Sample of how to make an Horizontal SplitContainer using a Grid and a GridSplitter like SnowBear said:

<Window x:Class="JobFinder1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="JobFinder1" Height="350" Width="525" AllowsTransparency="False">
    <Grid Name="gridMain">
        <Grid.RowDefinitions>
            <RowDefinition Height="26" />
            <RowDefinition />
            <RowDefinition Height="1"/>
            <RowDefinition />
        </Grid.RowDefinitions>

        <ToolBar Height="26" VerticalAlignment="Stretch" HorizontalAlignment="Left" />
        <ListView Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
        <GridSplitter Background="DarkGray"  ResizeDirection="Rows" Grid.Row="2" 
                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                      ResizeBehavior="PreviousAndNext" />
        <ListView Grid.Row="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
    </Grid>
</Window>

Tags:

C#

Wpf