.net - How to enable gesture detect in Scrollviewer control? -
i create page in windows phone 8.1 many component within it(not long list, other controls), utilize scrollviewer command wrap controls. in meantime, need back upwards gesture in page, swipe up/down.
in windows phone 8.1, scrollviewer command handled manipulationdelta , related event, , not fired manipulationdelta event.
after search, mentioned useoptimizedmanipulationrouting enable scrollviewer raise event. windows phone 8.1 runtime removed property. alter manipulationmode help receive manipulationdelta event, disable original scroll behavior of scrollviewer itself.
i understand scrollviewer need interrupt manipulationdelta event improve performance. question is there or alternate method help gesture when using scroll viewer?
there no way have gestures handled both scrollviewer , controls @ same time. scrollviewer runs parallel scheme handle manipulations.
as note, children of scrollviewer can manipulation events, scrollviewer won't so. if children don't take of area useful pattern allow manipulations on kid , scrolling outside of it. won't work if manipulatable children take on whole contents of scrollviewer.
the kid seek calling scrollviewer.changeview() have scrollviewer scroll along translation delta, end clunky @ edges between command , scrollviewer's. avoid border taking on of scrolling. if understand trying correctly i'd start: take on , phone call changeview needed.
you can cancel scrollviewer's manipulations canceldirectmanipulations, not other way around.
the hard part determining should handle given gesture. if utilize gesturerecognizer rather xaml manipulation events can decide on pointerpressed should handle gesture , either allow pass through scrollviewer or turn off scrollviewer. if need wait pointermoved identify gesture it's late.
i discussed regards windows store apps in windows 8 @ http://blogs.msdn.com/b/wsdevsol/archive/2013/02/16/where-did-all-my-gestures-go.aspx . few details different, general thought same windows 8.1 , windows phone 8.1 runtime apps xaml.
.net xaml windows-phone-8 windows-phone
No comments:
Post a Comment