microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

Proposal: Add ScrollView control to WinUI 2.x

Open michalleptuch opened this issue 3 years ago • 3 comments

Proposal: Add ScrollView control to WinUI 2.x

Summary

Request is to add ScrollView control to WinUI 2.x. This control works better in XAML Islands app than ScrollViewer. ScrollViewer control has a bug that slows scrolling down on monitors with higher scaling than 100%. It's especially noticeable using pen or touch. Microsoft Terminal has the same issue. I'm not sure if ScrollViewer can be fixed for all supported versions of Windows 10 and 11 so ScrollView control could be the best solution at this moment.

Rationale

There are a few samples XAML Islands app (WPF + UWP) and scrolling with different scaling. I used a pen to show cursor position and element that should follow position of the cursor.

100% (it works well) 100

150% 150

250% 250

Scope

Capability Priority
This proposal will allow developers to use ScrollView as container for scrollable content Must
This proposal will allow developers to use ScrollView in controls like ListView, GridView, ComboBox, etc. Must

Open Questions

If adding ScrollView is impossible, is it possible to change dynamics of scrolling in ScrollViewer control?

michalleptuch avatar Sep 09 '22 10:09 michalleptuch

I think it's better to modify the ScrollViewer behavior rather than creating an entirely new control.

itsWindows11 avatar Sep 10 '22 19:09 itsWindows11

@itsWindows11 how can I do that? 😊

michalleptuch avatar Sep 10 '22 19:09 michalleptuch

@itsWindows11 how can I do that? 😊

I don't know actually, it's just a note in case anyone wants to work on this issue

itsWindows11 avatar Sep 10 '22 20:09 itsWindows11

I think it's better to modify the ScrollViewer behavior rather than creating an entirely new control.

Actually no, extensions for adding functionality from ScrollView to ScrollViewer may be possible but might require more work. I thought this was a proposal for a new control so disregard that comment.

It could be certainly done from the platform end but users won't get smooth scrolling on earlier updates.

itsWindows11 avatar May 13 '23 14:05 itsWindows11