-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
BladeItem fix for #1218 #1609
BladeItem fix for #1218 #1609
Conversation
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 is great. Should the sample be updated to use the Header property?
Yup! |
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.
Just want to make sure we maintain layout behavior between the old and new?
@@ -32,9 +32,6 @@ public BladeItemMetadata() | |||
b.AddCustomAttributes(nameof(BladeItem.TitleBarVisibility), | |||
new CategoryAttribute(Properties.Resources.CategoryCommon) | |||
); | |||
b.AddCustomAttributes(nameof(BladeItem.Title), |
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.
Does Header not need to take its place here?
Or is that taken care of by the Expander inheritance in this situation?
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.
That should be part of the Expander
@@ -132,12 +134,10 @@ | |||
<ColumnDefinition Width="Auto" /> | |||
</Grid.ColumnDefinitions> | |||
|
|||
<TextBlock x:Name="TitleBar" | |||
Margin="4,0,0,0" |
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.
Doesn't look like there's a default template defined which maintains this padding and alignment for the text within the presenter?
We should make sure the visual behavior is consistent still with this type of change.
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.
Thanks for pointing that out, fixed!
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.
That's what CRs are for :).
Don't forget the HorizontalAlignment Property though too, called it out above.
<Setter Property="HeaderTemplate"> | ||
<Setter.Value> | ||
<DataTemplate> | ||
<TextBlock Text="{Binding}" Margin="4,0,0,0" VerticalAlignment="Center"/> |
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.
Don't forget the HorizontalAlignment either, default is Stretch not Left, as it was before. :)
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.
But TextBlock aligns to the left, so it's handled
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 PR is linked to unclosed issues. Please check if one of these issues should be closed: #1218 |
Issue: #1218
PR Type
What kind of change does this PR introduce?
Add default foreground properties to the default style
What is the current behavior?
Weird bug by the style not defining the foregrounds
PR Checklist
Please check if your PR fulfills the following requirements:
What is the new behavior?
Foregrounds are now part of the dele
Does this PR introduce a breaking change?
Other information
Marked the
Title
property as obsolete in favor of theHeader
property from the Expander