Halt / stop a ScrollViewer from scrolling when using a FlipView

痴心易碎 提交于 2020-01-07 06:43:13

问题


Moving on from this question where I wanted to fire an event when a FlipView changed even if manipulations wren't complete.

I have VerticalSnapPointsType set to SnapPointsType.MandatorySingle and once the event, from the initial question, fires, I'd like to halt scrolling. Currently the event fires every time the FlipView is changed but right when the animation stops, the user can flip again, even if I set IsHitTestVisible to false. If I CancelDirectManipulations() I get the desired effect but I don't think canceling manipulations was indented for this as scrolling seems to be disabled after its executed.

At a high level I'd like to:

  1. Fire an event each time the user flips.
  2. Halt scrolling and set IsHitTestVisible to false
  3. Do stuff based on user changing flipview
  4. Set IsHitTestVisible back to true so the user can flip it again

I'm trying to mimic the behavior of the music player on WP. Some of the music a user will flip to may be streamed so, like a transaction, I need to control the FlipView so I can coordinate with the background agent.

来源:https://stackoverflow.com/questions/27591603/halt-stop-a-scrollviewer-from-scrolling-when-using-a-flipview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!