问题描述
是否可以在 Windows Phone 8 中为捏合和缩放图像控件创建行为.我正在尝试在我的应用程序中对图像应用捏合和缩放以及旋转.在一个论坛中,我发现 Gesture listener 已被弃用,并且他们没有通过手势促进实现.那么任何人都可以为我建议一种替代方法.
Is it possible to create a behavior for Pinch and zoom to Image control in windows phone 8. I am trying to apply pinch and zoom along with rotation to Image in my application. In a forum I found that Gesture listener is deprecated and they are not promoting implementation with gesture. So can any one please suggest an alternative method for me.
推荐答案
如果您只针对 Windows Phone 8,您可以使用新的 ManipulationDeltaEventArgs.PinchManipulation 来自 ManipulationDelta 事件的属性.而不是使用 GestureListener/TouchPanel 进行捏合&zoom 你应该依赖这个新属性.
If you're targeting only Windows Phone 8 you can use the new ManipulationDeltaEventArgs.PinchManipulation property from the ManipulationDelta event. Instead of using GestureListener/TouchPanel for pinch & zoom you should rely on this new property.
这篇关于Windows Phone 的捏合和缩放行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!