w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
WPF Expander with GridSplitter

Try this, if it helps to resolve your problem.

<Window x:Class="WpfApplication1.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 ShowGridLines="True" >
    <Grid.ColumnDefinitions>
        <ColumnDefinition />
        <ColumnDefinition Width="Auto" Name="column"/>

    </Grid.ColumnDefinitions>

    <TextBox Grid.Column="0" HorizontalAlignment="Stretch"
TextWrapping="Wrap" 
         Text="TextBox" VerticalAlignment="Stretch"/>

    <Expander Grid.Column="1" Header="Expander" ExpandDirection="Left" 
          HorizontalAlignment="Right">
        <Expander.Content>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="5"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>

                <TextBlock Text="Some text Some text Some Text"
Grid.Column="0"/>
                <GridSplitter Grid.Column="1" Width="5"    
                          ResizeBehavior="PreviousAndCurrent"
                          ResizeDirection="Columns" 
                          HorizontalAlignment="Stretch"/>
            </Grid>
        </Expander.Content>
    </Expander>
</Grid>





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.