-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add Header content control template for Fluent and Simple themes #13028
Conversation
@dotnet-policy-service agree |
CornerRadius="{TemplateBinding CornerRadius}" | ||
Background="{TemplateBinding Background}" | ||
Padding="{TemplateBinding Padding}"> | ||
<StackPanel Orientation="Vertical"> |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
You can test this PR using the following package version. |
…nel for its layout
…HeaderContentControlTheme
You can test this PR using the following package version. |
src/Avalonia.Themes.Fluent/Controls/HeaderedContentControl.xaml
Outdated
Show resolved
Hide resolved
You can test this PR using the following package version. |
You can test this PR using the following package version. |
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 #7875It 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