Slider.TickPlacement Slider.TickPlacement Slider.TickPlacement Slider.TickPlacement Property

定義

Track の目盛りを配置する場合の Slider に対する位置を取得または設定します。Gets or sets the position of tick marks with respect to the Track of the Slider.

public:
 property System::Windows::Controls::Primitives::TickPlacement TickPlacement { System::Windows::Controls::Primitives::TickPlacement get(); void set(System::Windows::Controls::Primitives::TickPlacement value); };
[System.ComponentModel.Bindable(true)]
public System.Windows.Controls.Primitives.TickPlacement TickPlacement { get; set; }
member this.TickPlacement : System.Windows.Controls.Primitives.TickPlacement with get, set
Public Property TickPlacement As TickPlacement

プロパティ値

TickPlacement の目盛りをスライダー バーに対してどこに配置するかを定義する Slider 値。A TickPlacement value that defines how to position the tick marks in a Slider with respect to the slider bar. 既定値は、None です。The default is None.

TickPlacement プロパティを設定する方法を次の例に示します。The following example shows how to set the TickPlacement 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"/>

注釈

プロパティTickPlacementは、ティックを表示するため以外Noneの値に設定する必要があります。The TickPlacement property must be set to a value other than None for tick marks to appear.

適用対象

こちらもご覧ください