在 Silverlight 中将 Slider 的步长设置为非整数值
我确实有一个设置了最小值和最大值的滑块,但中间值不是整数(例如 4.51294141512 等)。如何将滑块滑块的步长设置为非整数值? 可能步长是1、5,但不是9.4148257822
I do have a Slider with set minimun and maximum, but the intermediate value is not integer (ex. 4.51294141512 etc). How can set the step of the slider slider to non-integer values?
May by step is 1, 5, but not 9.4148257822
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这在标准滑块中不可用。
您可以按照此处提到的方式对滑块进行子类化:滑块中的磁效应
This is not available in the standard Slider.
You could subclass the Slider as mentioned here: Magnetic Effect In Slider
创建一个事件:
nameslider_valueChanged
并对值进行舍入。示例
SAnios
是滑块控件的名称If Not IsNothing
是为了防止加载应用程序时出现错误。Create an event:
nameslider_valueChanged
and round the value.Example
SAnios
is name of slider controlThe
If Not IsNothing
is to prevent an error when loading the app.