How a Slider control in WPF can snap on specific values?

∥☆過路亽.° 提交于 2019-12-04 15:33:58

You have to override OnValueChanged. See this article DiscreteSlider - Adding Functionality with a Simple Control Subclass and then this artice Silverlight slider control that snaps for a detailed explanation.

Instead of using SmallChange, you would check where between your values the slider sits and snap to the nearest.

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