Wpf 多指应用开发解析 - terry119
source link: https://www.cnblogs.com/terryK/p/16498311.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Wpf 多指应用开发解析
1 首先分析多指事件与单指事件,以及执行顺序
2 事件阻断
订阅多指事件后,在TouchDown时 采用e.handle = true,阻断多指事件,或在ManipulationStarting、ManipulationStarted 时调用参数(ManipulationStartingEventArgs e)、(ManipulationStartedEventArgs e)e.cancel(); 但注意不可以在ManipulationDelta的参数( ManipulationDeltaEventArgs e)调用e.cancel(),否则之后也不会触发ManipulationDelta 事件
3 当触摸有多指的时间再去监听(不是在一开始或 第一指按下就就监听多指事件,而是在触摸之后再去监听),则不会触发ManipulationStaring 和ManipulationStarted 事件,为什么?只能查看源代码了...
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK