1

I'm making an online cinema UWP app and i need to implement horizontal "gallery" with movies. The app will be used on PC, Xbox and touch devices, so i need the scrolling to be working with mouse, arrow keys and touch scrolling with swipes.

Currently I'm using ListView with ScrollViewer, but it doesn't give me the intended result. I want mouse wheel to scroll vertically, but when pointer enters the area of ListView, it starts to scroll the View horizontally. Disabling horizontal scrolling, well, breaks everything, so this pure implementaion is not an option.

I like the way MS made horizontal gallery in Microsoft Store app. It's scrollable with touch swipes and keyboard, but mouse wheel does nothing. Instead, the view shows round arrow buttons on the sides of this horizontal list like this:

Horizontal scrolling in MS Store

I want to make something like that, but can't find any tips for controlling the scroll manually. Maybe there's any similar controls I don't know about or docs for making such control?

1
  • 1
    use Flipview control link you can bind the listview inside the FlipView
    – user11362349
    Commented Oct 14, 2019 at 5:08

1 Answer 1

2

It should not be a big deal.

Set the VerticalScrollMode="Disabled" , VerticalScrollBarVisibility="Disabled", HorizontalScrollMode="Auto" and HorizontalScrollBarVisibility="Auto". Then set those two buttons to left and right with vertically centered alignment.

Use the ChangeView Method in the Click event handler to programmatically scroll through the contents. That's it.

1
  • Okay, I've started going this way and have already encountered a problem: To make scrolling comfortable, i need to get ListViewItem into viewport fully. Any tips how I can achieve that? I think i need to get a list of all visible items first, but all the snippets for finding them are for the WPF and don't work properly with UWP
    – Tumist
    Commented Oct 15, 2019 at 5:43

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.