WPF range control Slider

WPF range control Slider

Slider

name illustrate
Orientation Switch between vertical and horizontal sliders
TickPlacement Determine the position of the scale display. By default, TickPlacement is set to None, and no tick mark is displayed. If it is a horizontal slider, you can place a tick mark on it (TopLeft) or place a tick mark on it (BottomRight). For vertical sliders, tick marks can be placed on the left (TopLeft) and right (BottomRight)
TickFrequency Set the interval between scales, which determines how many scales are displayed, for example, you can place a scale every 5 units, place a scale every 10 units, etc.
Ticks If you want to place ticks at specific irregular positions, you can use the Ticks collection. Simply add a value (double precision floating point number) to the set for each tick mark
IsSnapToTickEnabled If this property is true, when moving the slider, it will automatically jump to the appropriate position - the nearest tick mark, the default value is false
IsSelectionRangeEnabled If true, part of the slider can be shaded using the selection range. Use the SelectionStart and SelectionEnd properties to set the selection range
<Slider x:Name="sl" Value="0" Minimum="0" Maximum="100" SmallChange="1"  TickPlacement="BottomRight" Interval="1" IsSnapToTickEnabled="True" TickFrequency="1"></Slider>

Guess you like

Origin blog.csdn.net/weixin_47410172/article/details/132343810