[WPF] Grid Split WPF 2012. 3. 19. 14:43
그리드 스플릿. C#에서 스플릿 컨트롤러를 봤을 것인데 그것을 구현 한 것이다.

그리드 형태의 레이아웃을 먼저 자복 거기에 splitter를 붙여 만든 내용이다.

<Window x:Class="WpfApplication9.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
       
        <StackPanel Background="BurlyWood" Grid.Column="0" Grid.RowSpan="2">
            <TextBlock FontSize="30" Foreground="Blue" TextWrapping="Wrap">left</TextBlock>
        </StackPanel>
       
        <GridSplitter Width="10" Grid.RowSpan="2"></GridSplitter>
       
        <Border Grid.Column="1">
            <TextBlock FontSize="30" Foreground="Blue" TextWrapping="Wrap">Right</TextBlock>
        </Border>
       
        <GridSplitter Grid.Column="1" ResizeDirection="Rows" Height="10" VerticalAlignment="Bottom" HorizontalAlignment="Stretch"></GridSplitter>
        <Border Grid.Row="1" Grid.Column="1" Background="Red">
        <TextBlock FontSize="30" Foreground="Blue" TextWrapping="Wrap">Bottom</TextBlock>
        </Border>
    </Grid>   
</Window>