WP8下的自定义滑块 [英] Custom slider under WP8

查看:70
本文介绍了WP8下的自定义滑块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我转换此示例WP7项目时:

When I convert this sample WP7 project:

http://www.windowsphonegeek.com/articles/Customizing-WP7-Slider-in-different-ways

http://www.windowsphonegeek.com/articles/Customizing-WP7-Slider-in-different-ways

对于WP8,自定义滑块停止工作.他们冻结.我的实际项目也发生了同样的事情,我尝试将其移植到WP8.可能是什么原因,有什么解决办法?

to WP8, customized sliders stopped working. They freeze. This same thing happens to My actual project, which I try to port for WP8. What may be the cause and is there any solution?

谢谢.

推荐答案

Slider控件有一些重大更改,如App兼容性文档中所述: http://msdn.microsoft.com/zh-CN/library/windowsphone/develop/jj206947(v=vs.105).aspx

The Slider control has several breaking changes, as mentioned in the App compatibility document: http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206947(v=vs.105).aspx

在Windows Phone 8中,

In Windows Phone 8, the Slider control and its API have changed significantly.

Horizo​​ntalLargeIncrease Horizo​​ntalLargeDecrease Horizo​​ntalThumb VerticalLargeIncrease , 从控件模板中删除了 VerticalLargeDecrease VerticalThumb .

HorizontalLargeIncrease, HorizontalLargeDecrease, HorizontalThumb, VerticalLargeIncrease, VerticalLargeDecrease, and VerticalThumb have been removed from the control template.

对应的新模板部分为 Horizo​​ntalFill Horizo​​ntalTrack Horizo​​ntalCenterElement VerticalFill VerticalTrack VerticalCenterElement .新模板部分均为类型 FrameworkElement .

The corresponding new template parts are HorizontalFill, HorizontalTrack, and HorizontalCenterElement, VerticalFill, VerticalTrack, and VerticalCenterElement. The new template parts are all of type FrameworkElement.

如果您已重新模板化

If you have retemplated the Slider control in an app that you are upgrading to Windows Phone 8, you may have to modify your control template to accommodate the template parts that have been removed or added.


这篇关于WP8下的自定义滑块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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