-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting ScrollViewer
's VerticalScrollBarVisibility
to Visible
does not produce implied effect
#6703
Comments
Confusingly, what you've linked to the ScrollView code (a winui2 control) where as the ScrollViewer (a system xaml control) is the control in question. ScrollViewer's scrollbar integration is a little wonky, and is one of the things that was fixed in ScrollView. @RBrid correct me if i'm wrong, it is by design that the auto and visible behave the same here. I think there are some differences between the enum values though... do you know what they are? |
It seems to work for me as expected: even when using ScrollBarVisibility.Visible, the user needs to hover over the scrollbar area for a couple seconds before it appears. |
@RBrid I believe the issue was created because the OP wants the scrollbar to always be visible, even if no scrolling can be performed. That would be the differentiation between using Auto and Visible.
|
Thanks for following up. @RBrid |
Greetings. When ScrollViewer.ScrollableHeight > 0, ScrollBarVisibility.Auto acts like ScrollBarVisibility.Visible. When ScrollViewer.ScrollableHeight = 0 and ScrollViewer.VerticalScrollBarVisibility = Visible, the ScrollBar track and arrows appear on mouse hover. Its Thumb does not appear because there is nothing to scroll: The mouse hovering is needed because by default ScrollBars are in what we call 'conscious/shy' mode. The user can turn off that shy mode by selecting the "Always show scrollbars" option in the Settings app: At that point, ScrollBarVisibility.Visible causes the ScrollBar to always be visible. Same for ScrollBarVisibility.Auto when ScrollViewer.ScrollableHeight > 0 (or ScrollViewer.ScrollableWidth > 0). Hope this helps. Thanks. |
@RBrid |
You're correct @marwalsch, there is no application-level setting for that behavior. |
Describe the bug
When a
ScrollViewer
'sVerticalScrollBarVisibility
is set toVisible
, it apparently behaves in the exact same manner as inAuto
state:However, in compliance with the enum's corresponding value the scrollbar should always be present, even in the latter case (and reach its full width).
Even though I have the suspicion this is by design the API implicates otherwise.
Steps to reproduce the bug
ScrollViewer
'sVerticalScrollBarVisibility
toAuto
/Visible
;Expected behavior
Setting
VerticalScrollBarVisibility
toVisible
should always display the bar.Screenshots
NuGet package version
No response
Windows app type
Device form factor
Desktop
Windows version
Insider Build (xxxxx)
Additional context
No response
The text was updated successfully, but these errors were encountered: