Slider control with Move-To-Position behavior

落花浮王杯 提交于 2020-01-25 03:39:12

问题


In this page about the Slider control on Windows Phone, in the last paragraph, a behavior is mentionned: http://msdn.microsoft.com/en-us/library/hh202877(v=vs.92).aspx

You can also customize the behavior of a Slider control. Depending on how it’s being used, a Slider control might benefit from the following behaviors:

  • Move-to-Position: the thumb jumps to the position of the contact.

  • Snap-to-Tick: the thumb jumps to the tick value that is closest to its current position in the direction of the contact.

But I can't find in the class reference page where those behavior can be specified http://msdn.microsoft.com/en-us/library/system.windows.controls.slider(v=vs.95).aspx

I'm interested in the Move-To-Position one since the other one is the default behavior of the control.


回答1:


I can;t see that paragraph in the link you specify above. Wrong link? Normally to attach behaviors you would do something like this in XAML

<Slider>
   <Interactivity:Interaction.Behaviors>
       <Behaviours:MyCustomBehavior MyDependProp="someValue" />
   </Interactivity:Interaction.Behaviors>
</Slider>


来源:https://stackoverflow.com/questions/10621997/slider-control-with-move-to-position-behavior

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