问题
I am working on a slider, and below is the code:
<Slider Name="testother" Margin="10,0,0,0" Width="200" IsSnapToTickEnabled="True"
Value="0.5" Minimum="0" Maximum="1"
TickPlacement="BottomRight" TickFrequency="0.25" LargeChange="0.25"></Slider>
when the slider is on extreme left,and we want to bring the slider to extreme right, it takes 3 clicks having slider navigate at every stop of the tick. the pointer should move quickly at one click. Is there any way to solve this ?
回答1:
You need IsMoveToPointEnabled to be set to True to get this thing done!
<Slider IsSnapToTickEnabled="True"
Value="0.5"
Minimum="0"
Maximum="1"
TickPlacement="BottomRight"
TickFrequency="0.25"
IsMoveToPointEnabled="True"
LargeChange="1"/>
You can still set small change in case you want to change slider values from keyboard
来源:https://stackoverflow.com/questions/29164979/how-do-i-make-slider-move-to-value-in-one-click-on-tick-bar