Sdílet prostřednictvím


Slider.TickPlacement Property

Definition

Gets or sets a value that indicates where to draw tick marks in relation to the track.

public:
 property TickPlacement TickPlacement { TickPlacement get(); void set(TickPlacement value); };
TickPlacement TickPlacement();

void TickPlacement(TickPlacement value);
public TickPlacement TickPlacement { get; set; }
var tickPlacement = slider.tickPlacement;
slider.tickPlacement = tickPlacement;
Public Property TickPlacement As TickPlacement
<Slider TickPlacement="tickPlacementMemberName" />

Property Value

An enumeration value that specifies where to draw tick marks in relation to the track. The default is Inline.

Examples

Here's a slider with its TickFrequency set to 2 and its TickPlacement set to BottomRight.

<Slider x:Name="slider2"  
        Minimum="0" 
        Maximum="10"
        TickFrequency="2"
        TickPlacement="BottomRight"
        ValueChanged="slider2_ValueChanged" />

Remarks

The drawing of tick marks on a slider depends on both the TickFrequency and TickPlacement properties. In order for tick marks to be shown, you must set the TickFrequency property to a value greater than 0, and the TickPlacement property to a value other than None.

Applies to

See also