1

I have this layout:

<ScrollViewer>
    <StackPanel>
        <ListView>
            <ListView.View>
                <GridView>
                    <!-- Content -->
                </GridView>
            </ListView.View>
        </ListView>

    <!-- Filtering Controls -->
    </StackPanel>
</ScrollViewer>

The screen doesn't have a fixed or max height. The Scrollbar shows fine and works fine, but when the mouse is over the items in the List/GridView, the ScrollViewer doesn't receive the event and doesn't scroll.

I've read about how I can implement an extension, but that seems overdoing it, what's the simplest solution to make the List/GridView either pass the mouse wheel scroll event to the ScrollViewer or ignore them?

Muds
  • 4,006
  • 5
  • 31
  • 53
Danicco
  • 1,573
  • 2
  • 23
  • 49

1 Answers1

0

This happens because listview handles the scroll event, the simplest I can suggest is to override content of listview and insert a itemsPresenter which has no scroll properties inside it.

I solved such problem by using something like this..

<ListView>
  <ListView.Template>
    <ControlTemplate>
      <ItemsPresenter/>
    </ControlTemplate>
  </ListView.Template>
</ListView>

Have a look here for detailed discussion on this topic

Community
  • 1
  • 1
Muds
  • 4,006
  • 5
  • 31
  • 53
  • This way I kill the GridView layout inside the ListView. I've read that question too and this was the easiest solution I found, but I couldn't make it work with the GridView. – Danicco May 22 '15 at 14:10