다음을 통해 공유


ExpandDirection 열거형

정의

Expander 컨트롤이 열리는 방향을 지정합니다.

public enum class ExpandDirection
public enum ExpandDirection
type ExpandDirection = 
Public Enum ExpandDirection
상속
ExpandDirection

필드

Down 0

Expander 컨트롤이 아래로 열립니다.

Left 2

Expander 컨트롤이 왼쪽으로 열립니다.

Right 3

Expander 컨트롤이 오른쪽으로 열립니다.

Up 1

Expander 컨트롤이 위로 열립니다.

예제

다음 예제에서는 설정 하는 방법을 보여 줍니다 합니다 ExpandDirection 속성을는 ExpandDirection 열거형 멤버입니다.

<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 void ChangeExpandDirection(object sender, RoutedEventArgs e)
{
    if ((Boolean)ExpandDown.IsChecked)
        myExpander.ExpandDirection = ExpandDirection.Down;
    else if ((Boolean)ExpandUp.IsChecked)
        myExpander.ExpandDirection = ExpandDirection.Up;
    else if ((Boolean)ExpandLeft.IsChecked)
        myExpander.ExpandDirection = ExpandDirection.Left;
    else if ((Boolean)ExpandRight.IsChecked)
        myExpander.ExpandDirection = ExpandDirection.Right;

    //Expand myExpander so it is easier to see the effect of changing 
    //the ExpandDirection property for My Expander
    myExpander.IsExpanded = true;
}
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

설명

방향을 지정 하는 Expander 컨트롤 확장을 설정 합니다 ExpandDirection 열거형 멤버 중 하나에 대 한 속성입니다.

적용 대상

추가 정보