具有移动到位置行为的滑块控件 [英] Slider control with Move-To-Position behavior

查看:16
本文介绍了具有移动到位置行为的滑块控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这个关于 Windows Phone 上的 Slider 控件的页面中,在最后一段中,提到了一个行为:http://msdn.microsoft.com/en-us/library/hh202877(v=vs.92).aspx

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

您还可以自定义 Slider 控件的行为.根据如何使用它,Slider 控件可能会受益于以下内容行为:

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:拇指跳到当前位置联系方式.

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

Snap-to-Tick:拇指跳到最接近它的刻度值接触方向的当前位置.

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

但是我在类参考页面中找不到可以指定这些行为的地方http://msdn.microsoft.com/en-us/library/system.windows.controls.slider(v=vs.95).aspx

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

我对 Move-To-Position 感兴趣,因为另一个是控件的默认行为.

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

推荐答案

我看不到您在上面指定的链接中的那段.链接错误?通常要附加行为,您会在 XAML 中执行类似的操作

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>

这篇关于具有移动到位置行为的滑块控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆