Scroll bar should not overlap content
See original GitHub issueA Scroll Bar Should not Overlap A Component’s Content
Describe the bug
When a ScrollViewer scroll bar is displayed, it overlaps the component’s content.
This is unexpected behaviour, potentially leading to information being hidden.
Steps to reproduce the bug
I added a GridView
component to an UWP Page
, similar to this:
<Page>
<GridView ItemsSource="{x:Bind CdList}">
...
</GridView>
</Page>
When I change the window size, the GridView
’s vertical scrollbar partially hides/overlaps the rightmost items in the GridView
before GridView
wraps the items appropriately:
Expected behavior
The ScrollViewer
’s ItemPresenter
should be a sibling of the ScrollViewer
’s scroll bars, so, as soon as any of the scroll bars is displayed, the ItemPresenter size should shrink appropriately to spread across only the area left/above the scroll bars.
Scroll bars are supposed to appear outside the presenter area, not within.
Version Info
Windows 10 version | Saw the problem? |
---|---|
October 2020 Update (xxxxx) | Yes |
May 2020 Update (19041) | |
November 2019 Update (18363) | |
May 2019 Update (18362) | |
October 2018 Update (17763) | |
April 2018 Update (17134) | |
Fall Creators Update (16299) | |
Creators Update (15063) |
Device form factor | Saw the problem? |
---|---|
Desktop | Yes |
Xbox | |
Surface Hub | |
IoT |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Scrollbar overlaps content of fixed div
I have a fixed div (a shopping cart list) on the right side. If there are too many items, a scroll bar appears....
Read more >Overflow auto: Scrollbar styling. (making the ...
My idea was to make the scroll bar overlapp the content by setting its position to absolute. So I have been doing some...
Read more >Fix horizontal scrollbar overlapping content everywhere, ...
Fix horizontal scrollbar overlapping content everywhere, #51296.
Read more >Prevent Vertical and Horitzonal Scrollbar Overlap in Lower ...
I've been playing with padding and margin and not getting it quite right. I can get close with using padding-right to offset where...
Read more >DataGrid - A horizontal scrollbar overlaps a grid table
We have a request to allow a grid to be scrolled up far enough that the last row does not get overlapped by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hidden scrollbars look better from a design standpoint and are the latest convention.
In classic desktop scenarios, yes, it’s expected for the scroll bar to be to the right of the content and never overlap. If you are coming over from WPF this is strange behavior for sure.
However, remember UWP was designed to support mobile devices first. Mobile devices are very limited in horizontal size. This is why the mobile convention soon became for scroll bars to appear on top of content and automatically switch between a ‘traditional’ and minimized ‘panning’ view. Actually, Apple I believe was the first to design scroll bars that behaved this way on the iPhone and everyone just followed that idea. Scroll bars are now expected to automatically hide themselves when not scrolling and only show a small semi-transparent indicator.
So I disagree that it is unexpected – it is expected and necessary from a mobile standpoint. It is also the latest design convention. It may be best to simply set the Padding of the GridView (to 16px I believe) and push the content inward for your case.