TickPlacement Enum

Definition

Specifies the position of tick marks in a Slider control with respect to the Track that the control implements.

C#
public enum TickPlacement
Inheritance
TickPlacement

Fields

Name Value Description
None 0

No tick marks appear.

TopLeft 1

Tick marks appear above the Track for a horizontal Slider, or to the left of the Track for a vertical Slider.

BottomRight 2

Tick marks appear below the Track for a horizontal Slider, or to the right of the Track for a vertical Slider.

Both 3

Tick marks appear above and below the Track bar for a horizontal Slider, or to the left and right of the Track for a vertical Slider.

Examples

The following example shows how to set the Slider.TickPlacement property.

XAML
 <Slider Width="100" Value="50" Orientation="Horizontal" HorizontalAlignment="Left" 
IsSnapToTickEnabled="True" Maximum="3" TickPlacement="BottomRight" 
AutoToolTipPlacement="BottomRight" AutoToolTipPrecision="2" 
Ticks="0, 1.1, 2.5, 3"/>

Remarks

The TickPlacement enumeration is used to set the Slider.TickPlacement property.

The following illustration shows a Slider that has tick marks that are located below the Track. In this example, the Slider.TickPlacement property is set to BottomRight.

Slider Example

Slider illustration

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also