xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
HorizontalAlignment="Left" Header="My Expander"
ExpandDirection="Down" IsExpanded="True" Width="100">
this is a test
Click to change the ExpandDirection property on My Expander
IsChecked="True"
Checked="ChangeExpandDirection"
GroupName="ExpandDirectionProperty">
Expand Down
Checked="ChangeExpandDirection"
GroupName="ExpandDirectionProperty">
Expand Up
Checked="ChangeExpandDirection"
GroupName="ExpandDirectionProperty">
Expand Left
Checked="ChangeExpandDirection"
GroupName="ExpandDirectionProperty">
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