Skip to content

fix(controls): Add ViewportSize bindings to ListView ScrollBars#1689

Merged
pomianowski merged 1 commit intolepoco:mainfrom
jm6271:fix/gridview-scrollbar-thumb-size
Apr 23, 2026
Merged

fix(controls): Add ViewportSize bindings to ListView ScrollBars#1689
pomianowski merged 1 commit intolepoco:mainfrom
jm6271:fix/gridview-scrollbar-thumb-size

Conversation

@jm6271
Copy link
Copy Markdown
Contributor

@jm6271 jm6271 commented Apr 17, 2026

Bind the horizontal and vertical ScrollBar ViewportSize to the control template's ViewportWidth and ViewportHeight so the scrollbar thumb size correctly reflects the visible viewport. Changes applied to src/Wpf.Ui/Controls/ListView/ListView.xaml by adding TemplateBinding for ViewportSize on both ScrollBar elements.

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

Currently, the scrollbar thumbs on a ListView with a GridView are always minimum size, even when the list isn't very long. This is because the ViewportSize template binding isn't set on the scrollbar elements in the control template.

Issue Number: N/A

What is the new behavior?

This PR sets the ViewportHeight and ViewportWidth template bindings on the vertical and horizontal scrollbars in the GridViewScrollViewerTemplate control template.

Other information

Before:
Screenshot 2026-04-17 162358

After:
Screenshot 2026-04-17 162150

@jm6271 jm6271 requested a review from pomianowski as a code owner April 17, 2026 20:27
@github-actions github-actions Bot added controls Changes to the appearance or logic of custom controls. styles Topic is related to styles PR Pull request release labels Apr 17, 2026
@jm6271 jm6271 changed the title Add ViewportSize bindings to ListView ScrollBars fix(controls): Add ViewportSize bindings to ListView ScrollBars Apr 17, 2026
@pomianowski pomianowski merged commit 40f1e37 into lepoco:main Apr 23, 2026
2 checks passed
@jm6271 jm6271 deleted the fix/gridview-scrollbar-thumb-size branch April 24, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controls Changes to the appearance or logic of custom controls. PR Pull request release styles Topic is related to styles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants