Skip to content
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

Add Header content control template for Fluent and Simple themes #13028

Merged
merged 13 commits into from
Sep 29, 2023

Conversation

thevortexcloud
Copy link
Contributor

What does the pull request do?

The HeaderedContentControl does not currently have any template. This adds one to both the Simple and Fluent themes. As was discussed in #7875

It also adds a new page to the Control Catalogue with some examples showing how to use HeaderedContentControl.

What is the current behavior?

Currently there is no template at all for HeaderedContentControl, which makes any attempt to use it render non-tangible content.

What is the updated/expected behavior with this PR?

The control should now show a header and content according to their templates and header/content values when using the Simple or Fluent themes.

How was the solution implemented (if it's not obvious)?

A new template was added to the Simple and Fluent themes.

Checklist

Breaking changes

None known. But it's possible it may cause some issues with people who have themed the control themselves previously.

Obsoletions / Deprecations

Fixed issues

Fixes #7875

@thevortexcloud
Copy link
Contributor Author

@dotnet-policy-service agree

CornerRadius="{TemplateBinding CornerRadius}"
Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}">
<StackPanel Orientation="Vertical">
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it make more sense if it was a DockPanel? Or Grid?
Where PART_HeaderPresenter has DockPanel.Dock="Top"

Copy link
Member

Choose a reason for hiding this comment

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

This way content won't have infinite height by default, making it usable with list controls

Copy link
Contributor Author

@thevortexcloud thevortexcloud Sep 26, 2023

Choose a reason for hiding this comment

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

I am certainly not against doing that. As was discussed in #7875 this is fairly close to how WPF does it. UWP however does use a grid. So I will change it to use a grid.

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0040016-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0040020-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0040058-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0040156-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added this pull request to the merge queue Sep 29, 2023
Merged via the queue into AvaloniaUI:master with commit dbdde5e Sep 29, 2023
5 checks passed
@thevortexcloud thevortexcloud deleted the HeaderContentControlTheme branch September 29, 2023 02:06
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.

4 participants