ExpandDirection ExpandDirection ExpandDirection ExpandDirection Enum

Definición

Especifica la dirección en la que se abre un control Expander.Specifies the direction in which an Expander control opens.

public enum class ExpandDirection
public enum ExpandDirection
type ExpandDirection = 
Public Enum ExpandDirection
Herencia
ExpandDirectionExpandDirectionExpandDirectionExpandDirection

Campos

Down Down Down Down 0

El control Expander se abre hacia abajo.The Expander control opens down.

Left Left Left Left 2

El control Expander se abre hacia la izquierda.The Expander control opens left.

Right Right Right Right 3

El control Expander se abre hacia la derecha.The Expander control opens right.

Up Up Up Up 1

El control Expander se abre hacia arriba.The Expander control opens up.

Ejemplos

El ejemplo siguiente muestra cómo establecer el ExpandDirection propiedad a un ExpandDirection miembro de enumeración.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>
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

Comentarios

Para especificar la dirección que un Expander control se expande, establezca el ExpandDirection propiedad en uno de los miembros de enumeración.To specify the direction that an Expander control expands, set the ExpandDirection property to one of the enumeration members.

Se aplica a

Consulte también: