问题
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:
- Fire an event each time the user flips.
- Halt scrolling and set
IsHitTestVisible
to false - Do stuff based on user changing flipview
- 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