Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ScrollViewer GridView XAML

I am currently building a Windows 8 XAML C# application. In a page I have a scrollviewer for horizontal swiping and scrolling. I have several controls in it which work really well with the scorllviewer. But when you scroll and your cursor is on top of the ListView / GridView, then that control will handle scrollnig instead of the scrollviewer. With swiping this doesn't happen, but with the mouse scrollwheel it stops the scrollvieweing scroll. Does anybody know how to disable this behavior or have a workaround?

like image 681
Michel Bakker Avatar asked Aug 17 '12 12:08

Michel Bakker


1 Answers

After working with this problem for quite a while i decided to change tactics. At least in my solution I changed the inner GridView to just be an ItemsControl. That way I can handle all the click/tap but still let scroll work as expected.

Of course this solution isn't for everybody as sometimes you need all the selection stuff as well. But for me it worked as I only needed the item click/tap.

Hope it helps

like image 129
haqwin Avatar answered Oct 27 '22 09:10

haqwin