WP8下的自定义滑块 [英] Custom slider under 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
In Windows Phone 8, the Slider control and its API have changed significantly.
HorizontalLargeIncrease , HorizontalLargeDecrease , HorizontalThumb , VerticalLargeIncrease , 从控件模板中删除了 VerticalLargeDecrease 和 VerticalThumb .
HorizontalLargeIncrease, HorizontalLargeDecrease, HorizontalThumb, VerticalLargeIncrease, VerticalLargeDecrease, and VerticalThumb have been removed from the control template.
对应的新模板部分为 HorizontalFill , HorizontalTrack 和 HorizontalCenterElement , 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屋!