Slider.Orientation Propriedade

Definição

Obtém ou define a orientação de um Slider.Gets or sets the orientation of a Slider.

public:
 property System::Windows::Controls::Orientation Orientation { System::Windows::Controls::Orientation get(); void set(System::Windows::Controls::Orientation value); };
public System.Windows.Controls.Orientation Orientation { get; set; }
member this.Orientation : System.Windows.Controls.Orientation with get, set
Public Property Orientation As Orientation

Valor da propriedade

Um dos valores de Orientation.One of the Orientation values. O padrão é Horizontal.The default is Horizontal.

Exemplos

O exemplo a seguir mostra como definir a propriedade Orientation.The following example shows how to set the Orientation property.

Slider hslider = new Slider();
hslider.Width = 100;
hslider.Orientation = Orientation.Horizontal;
hslider.IsSnapToTickEnabled = true;
hslider.Minimum = 1;
hslider.Maximum = 20;
hslider.TickPlacement = TickPlacement.Both;
hslider.TickFrequency = 2;
hslider.AutoToolTipPlacement =
  AutoToolTipPlacement.BottomRight;
cv1.Children.Add(hslider);
Dim hslider As New Slider()
hslider.Width = 100
hslider.Orientation = Orientation.Horizontal
hslider.IsSnapToTickEnabled = True
hslider.Minimum = 1
hslider.Maximum = 20
hslider.TickPlacement = TickPlacement.Both
hslider.TickFrequency = 2
hslider.AutoToolTipPlacement = AutoToolTipPlacement.BottomRight
cv1.Children.Add(hslider)
<Slider Name="slider1" 
        Width="100" 
        Orientation="Horizontal" HorizontalAlignment="Left" 
        IsSnapToTickEnabled="True" Minimum="1" Maximum="20" 
        TickPlacement="Both"  TickFrequency="2"
        AutoToolTipPlacement="BottomRight"/>

Comentários

Essa propriedade é associada à propriedade Orientation para o controle de Track que o Slider implementa.This property binds to the Orientation property for the Track control that the Slider implements.

Informações da propriedade de dependênciaDependency Property Information

Campo de identificadorIdentifier field OrientationProperty
Propriedades de metadados definidas como trueMetadata properties set to true NenhumNone

Aplica-se a