Scroll Gestures not Passed to IScrollInfo implementing panel in Windows Phone 7 CTP

Posted by user50088 on Stack Overflow See other posts from Stack Overflow or by user50088
Published on 2010-05-08T06:25:27Z Indexed on 2010/05/08 6:28 UTC
Read the original article Hit count: 226

Filed under:
|

I am using a custom panel as a ItemsPanel for a ItemsControl in a with a custom template that provides for a scroll viewer. (See Xaml below.) So long as my panel does not implement IScrollInfo, scrolling works in this scenerio.

I implement IScrollInfo and update my viewport and extent sizes in measure override. The scroll bar shows the correct relative size, and if I call the IScrollInfo methods directly, scrolling works as expected. However, the drag and flick gestures no longer scroll the content. Putting a breakpoint on the input of every IScrollInfo method shows that drag and pick are not calling the interface. Removing the IScrollInfo interface declaration restores the scroll on drag and flick behavior.

Is there a simple way to restore the flick and pan gestures to ItemControls with panels that implement IScrollInfo?

© Stack Overflow or respective owner

Related posts about windows-mobile

Related posts about gestures