This documentation is archived and is not being maintained.
ExpandDirection Enumeration
Visual Studio 2008
Specifies the direction in which an Expander control opens.
Assembly: PresentationFramework (in PresentationFramework.dll)
To specify the direction that an Expander control expands, set the ExpandDirection property to one of the enumeration members.
The following example shows how to set the ExpandDirection property to an ExpandDirection enumeration member. For the complete sample, see Expander Sample.
<StackPanel> <RadioButton Name="ExpandDown" Margin="0,10,0,10" IsChecked="True" Checked="ChangeExpandDirection" GroupName="ExpandDirectionProperty"> Expand Down </RadioButton> <RadioButton Name="ExpandUp" Margin="0,0,0,10" Checked="ChangeExpandDirection" GroupName="ExpandDirectionProperty"> Expand Up </RadioButton> <RadioButton Name="ExpandLeft" Margin="0,0,0,10" Checked="ChangeExpandDirection" GroupName="ExpandDirectionProperty"> Expand Left </RadioButton> <RadioButton Name="ExpandRight" Margin="0,0,0,10" Checked="ChangeExpandDirection" GroupName="ExpandDirectionProperty"> Expand Right </RadioButton> </StackPanel>
Private Sub ChangeExpandDirection(ByVal Sender As Object, ByVal e As RoutedEventArgs) If (ExpandDown.IsChecked) Then myExpander.ExpandDirection = ExpandDirection.Down ElseIf (ExpandUp.IsChecked) Then myExpander.ExpandDirection = ExpandDirection.Up ElseIf (ExpandLeft.IsChecked) Then myExpander.ExpandDirection = ExpandDirection.Left ElseIf (ExpandRight.IsChecked) Then myExpander.ExpandDirection = ExpandDirection.Right End If 'Expand myExpander so it is easier to see the effect of changing 'the ExpandDirection property for My Expander myExpander.IsExpanded = True End Sub
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: