Search This Blog

Thursday, July 28, 2016

GridSplitter WPF Example

WPF > Controls  > GridSplitter 




<Window x:Class="GridSplitter.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="2" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="TextBlock1" VerticalAlignment="Top" Grid.Column="0"/>
        <GridSplitter Grid.Column="1" Width="2" HorizontalAlignment="Stretch" />
        <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="TextBlock2" VerticalAlignment="Top" Grid.Column="2"/>
    </Grid>
</Window>