How can I make a Windows 8 Metro scrollviewer respond to mousewheel?

后端 未结 3 485
无人共我
无人共我 2021-02-09 10:16

I\'m currently writing an app for Windows 8 using Metro and C#. In my app I use a combination of scrollviewer and gridview to show my data. My problem is however, how can I make

3条回答
  •  死守一世寂寞
    2021-02-09 10:53

    The ScrollViewer in WinRT does work out of the box with the mouse wheel. However, in your scenario there are really two ScrollViewers, the one you created and the one inside the GridView template. These two conflict.

    To solve this problem, I removed the ScrollViewer from the GridView template as follows:

    
        
            
        
    
    

    This seems to work, but it may have other unwanted side effects...

提交回复
热议问题