Represents a control that draws a set of tick marks for a Slider control.
Namespace:System.Windows.Controls.Primitives Assembly:PresentationFramework (in PresentationFramework.dll) XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
The TickBar and Slider controls both contain properties that perform the same function. The following table shows the TickBar properties and the corresponding Slider properties to which they are bound. The TickBar properties take precedence when Slider and TickBar properties that are related are both specified.
This example shows how to create a Slider control that has tick marks.
The TickBar displays when you set the TickPlacement property to a value other than None, which is the default value.
The following example shows how to create a Slider with a TickBar that displays tick marks. The TickPlacement and TickFrequency properties define the location of the tick marks and the interval between them. When you move the Thumb, tooltips display the value of the Slider. The AutoToolTipPlacement property defines where the tooltips occur. The Thumb movements correspond to the location of the tick marks because IsSnapToTickEnabled is set to true.
The following example shows how to use the Ticks property to create tick marks along the Slider at irregular intervals.