Skip to content

Fix CardExpander height to enable ScrollViewer functionality - #1747

Open
Just-Silver wants to merge 3 commits into
lepoco:mainfrom
Just-Silver:fix/cardexpander-content-row-height
Open

Fix CardExpander height to enable ScrollViewer functionality#1747
Just-Silver wants to merge 3 commits into
lepoco:mainfrom
Just-Silver:fix/cardexpander-content-row-height

Conversation

@Just-Silver

Copy link
Copy Markdown

Pull request type

  • 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?

The CardExpander template defines the content row as Height="Auto" (line 117 in CardExpander.xaml), which causes the content area to grow unbounded regardless of available space. This prevents ScrollViewer from working — wrapping content in ScrollViewer has no effect because the parent Grid never constrains height.

What is the new behavior?

  • Changed CardExpander.xaml content row from Height="Auto" to Height="*"
  • This matches WPF's native Expander behavior, allowing content to fill available space and enabling scrolling when content overflows

Other information

Before: Content row uses Height="Auto", content grows infinitely, ScrollViewer has no effect.

After: Content row uses Height="*", content is constrained to available space, ScrollViewer works correctly.

-                            <RowDefinition Height="Auto" />
+                            <RowDefinition Height="*" />

@Just-Silver
Just-Silver requested a review from pomianowski as a code owner July 23, 2026 03:53
@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 Jul 23, 2026
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.

1 participant