Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ExpandDirection Enumeration

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Specifies the direction in which an Expander control opens.

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

type ExpandDirection

Member nameDescription
Down

The Expander control opens down.

Left

The Expander control opens left.

Right

The Expander control opens right.

Up

The 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.

<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>
No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft