Last active
August 29, 2015 14:07
-
-
Save dgwaldo/a4786d70010af88e2150 to your computer and use it in GitHub Desktop.
Horizontal & Vertical GridSplitter Example - with two list boxes above and below the horizontal split.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:sys="clr-namespace:System;assembly=mscorlib" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > | |
<Grid > | |
<Grid.RowDefinitions> | |
<RowDefinition Height="*" /> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="*" /> | |
</Grid.RowDefinitions> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="*" /> | |
<ColumnDefinition Width="Auto" /> | |
<ColumnDefinition Width="*" /> | |
</Grid.ColumnDefinitions> | |
<ListBox Grid.Row="0" Background="White"> | |
<ListBoxItem>Item 1</ListBoxItem> | |
<ListBoxItem>Item 2</ListBoxItem> | |
<ListBoxItem>Item 3</ListBoxItem> | |
<ListBoxItem>Item 4</ListBoxItem> | |
<ListBoxItem>Item 5</ListBoxItem> | |
</ListBox> | |
<GridSplitter Grid.Row="1" Height="3" Background="Black" | |
VerticalAlignment="Center" HorizontalAlignment="Stretch" /> | |
<ListBox Grid.Row="2" Background="Gray" > | |
<ListBoxItem>Item 1</ListBoxItem> | |
<ListBoxItem>Item 2</ListBoxItem> | |
<ListBoxItem>Item 3</ListBoxItem> | |
<ListBoxItem>Item 4</ListBoxItem> | |
<ListBoxItem>Item 5</ListBoxItem> | |
<ListBoxItem>Item 6</ListBoxItem> | |
<ListBoxItem>Item 7</ListBoxItem> | |
<ListBoxItem>Item 8</ListBoxItem> | |
<ListBoxItem>Item 9</ListBoxItem> | |
<ListBoxItem>Item 10</ListBoxItem> | |
</ListBox> | |
<GridSplitter Grid.Row="0" Grid.RowSpan="3" Grid.Column="1" Width="3" Background="Black" | |
VerticalAlignment="Stretch" HorizontalAlignment="Center" /> | |
<Rectangle Fill="LightBlue" Grid.Column="2" Grid.Row="0" Grid.RowSpan="3" /> | |
</Grid> | |
</Page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment