Export (0) Print
Expand All
Expand Minimize

ExpandDirection Enumeration

Specifies the direction in which an Expander control opens.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

Public Enumeration ExpandDirection
<object property="enumerationMemberName" .../>

Member nameDescription
DownThe Expander control opens down.
LeftThe Expander control opens left.
RightThe Expander control opens right.
UpThe Expander control opens up.

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.

  <RadioButton Name="ExpandDown" Margin="0,10,0,10" 
     Expand Down
  <RadioButton Name="ExpandUp" Margin="0,0,0,10"
     Expand Up
  <RadioButton Name="ExpandLeft" Margin="0,0,0,10"
    Expand Left
  <RadioButton Name="ExpandRight" Margin="0,0,0,10"
    Expand Right
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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft