I am using GridViews
representing files of different folders. Those GridViews
with one row and horizontal orientation are orderd within an vertical ListView
.
Here you get an idea from code:
<ListView ItemSource={Binding CollectionOfFolders}>
<ListView.ItemTemplate>
<GridView>
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<ItemsWrapGrid Loaded="WrapGridLoaded"
MaximumRowsOrColumns="1"
Orientation="Vertical" />
</ItemsPanelTemplate>
</GridView.ItemsPanel>
<GridView.ItemTemplate>
...
</GridView.ItemTemplate>
</GridView>
</ListView.ItemTemplate>
</ListView>
And a visual impression here:
The problem is the handling of the vertical and horizontal scrolling.
With toch input everythings works as desired: When you move your finger up and down, you scroll through the listview (the folders). If you move your finger horizontally your scroll through the GridView (files).
The problem comes, when using a mouse wheel or touchpad with the two finger sroll gesture: When the pointer is on any item or file respectivley, it doesn't affect the ListView. All gestures do affect the gridview only.
I tried to disable and enable the vertical and horizontal scrollmodes, the IsVertical/HorizontalModeChanningEnabled property and also the effects of the scroll bar and scroll rail visibility.
I fount these questions related to the problem, but could find a solution for this specific problem I just decriped:
- Ignore horizontal mouse scrolling with nested ScrollViewer
- ScrollViewer IsHorizontalScrollChainingEnabled and IsHorizontalRailEnabled functionality
It would be great if anybody does have ideas or even a solution.