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?

1 Answer 1

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

1
  • 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, 2015 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.