TickPlacement 枚举

定义

指定 Slider 控件中的刻度线相对于该控件实现的 Track 的位置。Specifies the position of tick marks in a Slider control with respect to the Track that the control implements.

public enum class TickPlacement
public enum TickPlacement
type TickPlacement = 
Public Enum TickPlacement
继承
TickPlacement

字段

Both 3

对于水平 Track,刻度线出现在 Slider 条的上方和下方,对于垂直 Track,刻度线出现在 Slider 的左侧和右侧。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.

BottomRight 2

对于水平 Track,刻度线出现在 Slider 下方,对于垂直 Track,刻度线出现在 Slider 右侧。Tick marks appear below the Track for a horizontal Slider, or to the right of the Track for a vertical Slider.

None 0

未显示刻度线。No tick marks appear.

TopLeft 1

对于水平 Track,刻度线出现在 Slider 上方,对于垂直 Track,刻度线出现在 Slider 左侧。Tick marks appear above the Track for a horizontal Slider, or to the left of the Track for a vertical Slider.

示例

下面的示例演示如何设置 Slider.TickPlacement 属性。The following example shows how to set the Slider.TickPlacement property.

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

注解

TickPlacement枚举用于Slider.TickPlacement设置属性。The TickPlacement enumeration is used to set the Slider.TickPlacement property.

下图显示了一个Slider具有位于下的Track刻度线的。The following illustration shows a Slider that has tick marks that are located below the Track. 在此示例中, Slider.TickPlacement属性设置为。 BottomRightIn this example, the Slider.TickPlacement property is set to BottomRight.

滑块示例Slider Example

滑块插图Slider illustration

适用于

另请参阅