Slider.IsSnapToTickEnabled 속성

정의

Slider에서 Thumb을 자동으로 가장 가까운 눈금으로 옮길지 여부를 나타내는 값을 가져오거나 설정합니다.

public:
 property bool IsSnapToTickEnabled { bool get(); void set(bool value); };
[System.ComponentModel.Bindable(true)]
public bool IsSnapToTickEnabled { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.IsSnapToTickEnabled : bool with get, set
Public Property IsSnapToTickEnabled As Boolean

속성 값

Boolean

Slider에서 Thumb의 위치를 눈금으로 옮기면 true이고, 그렇지 않으면 false입니다. 기본값은 false입니다.

특성

예제

다음 예제에서는 IsSnapToTickEnabled 속성을 설정하는 방법을 보여 줍니다.

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"/>

설명

위치 Thumb 가 변경되고 IsSnapToTickEnabled 속성이 설정 trueThumb 되면 가장 가까운 눈금 표시로 자동으로 이동됩니다.

종속성 속성 정보

식별자 필드 IsSnapToTickEnabledProperty
메타 데이터 속성 설정 true 없음

적용 대상