Cette documentation est archivée et n’est pas conservée.

TickPlacement, énumération

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

Espace de noms: System.Windows.Controls.Primitives
Assembly : PresentationFramework (dans presentationframework.dll)
Espace de noms XML :  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public enum TickPlacement
public enum TickPlacement
public enum TickPlacement
<propriété d'objet="ValeurÉnumération" .../>

 Nom de membreDescription
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"/>

Davantage de code

How to: Create a Slider with a TickBar

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

Microsoft .NET Framework 3.0 est pris en charge sur Windows Vista, Microsoft Windows XP SP2 et Windows Server 2003 SP1.

.NET Framework

Prise en charge dans : 3.0
Afficher: