Skip to content

Add expander functionality to define custom header height#496

Merged
SKProCH merged 5 commits intoAvaloniaCommunity:masterfrom
geskill:expander-header-height
Mar 29, 2026
Merged

Add expander functionality to define custom header height#496
SKProCH merged 5 commits intoAvaloniaCommunity:masterfrom
geskill:expander-header-height

Conversation

@geskill
Copy link
Copy Markdown
Contributor

@geskill geskill commented Mar 28, 2026

Currently the expander height is always 48.

This adds the functionality to change the expander height.

        <Expander Header="This is expander! Click me to expand the content."
                  assists:ExpanderAssist.HeaderHeight="64"
                  Content="{Binding }"
                  ContentTemplate="{StaticResource LoremContentTemplate}"/>

@SKProCH SKProCH self-requested a review March 29, 2026 11:38
@SKProCH
Copy link
Copy Markdown
Collaborator

SKProCH commented Mar 29, 2026

Probably we should also update the whole control?

Like currently in avalonia expander style there is a DockPanel. So, if we migrate to DockPanel, we can just setup the width/height of a ToggleButton instead of relying of margins and converters.

What do you think?

@geskill
Copy link
Copy Markdown
Contributor Author

geskill commented Mar 29, 2026

Yes, this is a much cleaner solution. I made the changes 🙌

@SKProCH
Copy link
Copy Markdown
Collaborator

SKProCH commented Mar 29, 2026

Looks fine, but should you add the changeable height for header?

@geskill
Copy link
Copy Markdown
Contributor Author

geskill commented Mar 29, 2026

Looks fine, but should you add the changeable height for header?

I've tested the code and the height adjusts itself dynamically.

Or did you mean to add some bigger header in the demo project?

@SKProCH
Copy link
Copy Markdown
Collaborator

SKProCH commented Mar 29, 2026

I've tested the code and the height adjusts itself dynamically.

Oh, yeah, this is fine.

Or did you mean to add some bigger header in the demo project?

Yeah, i guess this would be fine

Copy link
Copy Markdown
Collaborator

@SKProCH SKProCH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@SKProCH
Copy link
Copy Markdown
Collaborator

SKProCH commented Mar 29, 2026

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants