How do I make Slider move to value in one click on tick bar

爷,独闯天下 提交于 2020-01-02 10:08:32

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!