Export (0) Print
Expand All

TickPlacement Enumeration

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

Namespace: System.Windows.Controls.Primitives
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public enum TickPlacement
public enum TickPlacement
public enum TickPlacement
<object property="EnumerationValue" .../>

 Member nameDescription
BothTick 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
BottomRightTick marks appear below the Track for a horizontal Slider, or to the right of the Track for a vertical Slider.  
NoneNo tick marks appear.  
TopLeftTick marks appear above the Track for a horizontal Slider, or to the left of the Track for a vertical Slider.  

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

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

Slider Example

Slider illustration

The following example shows how to set the TickPlacement property for a Slider control. For the complete sample, see Slider Sample.

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

More Code

How to: Create a Slider with a TickBar

This example shows how to create a Slider control that has tick marks.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft