xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="GridSplitter Example">
Row 0 Col 0
Row 1 Col 0
Row 2 Col 1
Row 0 Col 1
Row 1 Col 1
Row 2 Col 1
Row 0 Col 2
Row 1 Col 2
Row 2 Col 2
Property Settings
VerticalAlignment
Top
Bottom
Center
Stretch (default)
//File:Window.xaml.vb
Imports System
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Media
Imports System.Windows.Navigation
Imports System.Windows.Shapes
Namespace GridSplitter_Example
Public Partial Class Window1
Inherits Window
Public Sub New()
InitializeComponent()
End Sub
Private Sub VerticalAlignmentChanged(sender As Object, e As RoutedEventArgs)
If CType(VerticalAlignmentTop.IsChecked, [Boolean]) Then
myGridSplitter.VerticalAlignment = VerticalAlignment.Top
ElseIf CType(VerticalAlignmentBottom.IsChecked, [Boolean]) Then
myGridSplitter.VerticalAlignment = VerticalAlignment.Bottom
ElseIf CType(VerticalAlignmentCenter.IsChecked, [Boolean]) Then
myGridSplitter.VerticalAlignment = VerticalAlignment.Center
ElseIf CType(CType(VerticalAlignmentStretch.IsChecked, [Boolean]), [Boolean]) Then
myGridSplitter.VerticalAlignment = VerticalAlignment.Stretch
End If
End Sub
End Class
End Namespace