Switch the BackgroundSizing
default to InnerBorderEdge
#19532
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does the pull request do?
Switches the default value of
BackgroundSizing
fromCenterBorder
toInnerBorderEdge
. This aligns Avalonia with the implicit behavior of WPF and the explicit behavior of UWP/WinUI. From a design standpoint it also looks a lot better as the default thanCenterBorder
.The reason(s) this wasn't done in #14048 are:
CenterBorder
was the implicit behavior of the simple rendering path.BoxShadow
on Border only works with the simple rendering path, which in turn only works withCenterBorder
:Now that we are preparing for 12.0 and allowing some breaking changes, it is time to improve the default value and align with other XAML frameworks.
Yes, I expect this to open up a debate.
What is the current behavior?
The current default value is
CenterBorder
:What is the updated/expected behavior with this PR?
The default value of
BackgroundSizing
is nowInnerBorderEdge
aligning with WPF, UWP and WinUI.How was the solution implemented (if it's not obvious)?
Obvious.
Checklist
Breaking changes
Yes
Obsoletions / Deprecations
None
Fixed issues
None, related to #9946 and #14048