Mega Code Archive
Use the Expander control and set the ExpandDirection property
this is a test
Click to change the ExpandDirection property on My Expander
Expand Down
Expand Up
Expand Left
Expand Right
//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 ExpanderDirectionExample
Public Partial Class Page1
Inherits Page
Private Sub ChangeExpandDirection(sender As Object, e As RoutedEventArgs)
If CType(ExpandDown.IsChecked, [Boolean]) Then
myExpander.ExpandDirection = ExpandDirection.Down
ElseIf CType(ExpandUp.IsChecked, [Boolean]) Then
myExpander.ExpandDirection = ExpandDirection.Up
ElseIf CType(ExpandLeft.IsChecked, [Boolean]) Then
myExpander.ExpandDirection = ExpandDirection.Left
ElseIf CType(ExpandRight.IsChecked, [Boolean]) Then
myExpander.ExpandDirection = ExpandDirection.Right
End If
myExpander.IsExpanded = True
End Sub
End Class
End Namespace