<ui:Page
    x:Class="ModernWpf.SampleApp.ControlPages.GridSplitterPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ui="http://schemas.modernwpf.com/2019"
    xmlns:sc="clr-namespace:SamplesCommon;assembly=SamplesCommon"
    mc:Ignorable="d">

    <ScrollViewer>
        <ui:SimpleStackPanel Style="{StaticResource ControlPageContentPanelStyle}">
            <sc:ControlExample
                HeaderText="A simple GridSplitter."
                HorizontalContentAlignment="Stretch">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <TextBlock
                        Grid.Column="0"
                        Text="Column 1"
                        Style="{StaticResource HeaderTextBlockStyle}"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center" />
                    <GridSplitter
                        x:Name="ColumnGridSplitter"
                        Grid.Column="1"
                        Width="5" />
                    <TextBlock
                        Grid.Column="2"
                        Text="Column 2"
                        Style="{StaticResource HeaderTextBlockStyle}"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center" />
                </Grid>
                <sc:ControlExample.Options>
                    <ui:SimpleStackPanel Style="{StaticResource OptionsPanelStyle}">
                        <CheckBox
                            Content="ShowsPreview"
                            IsChecked="{Binding ElementName=ColumnGridSplitter, Path=ShowsPreview}" />
                    </ui:SimpleStackPanel>
                </sc:ControlExample.Options>
            </sc:ControlExample>
        </ui:SimpleStackPanel>
    </ScrollViewer>
</ui:Page>
