-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
PlacementMode
-> Placement
#10664
PlacementMode
-> Placement
#10664
Conversation
/// </summary> | ||
public PlacementMode PlacementMode | ||
/// <inheritdoc cref="Popup.Placement"/> | ||
public PlacementMode Placement |
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.
All of the Popup "Placement" properties shouldn't really be duplicated here. There is an open question if ContextMenu should be deriving from PopupFlyoutBase as well (like MenuFlyout).
/// <summary> | ||
/// Gets or sets the Horizontal offset of the context menu in relation to the <see cref="PlacementTarget"/>. | ||
/// </summary> | ||
/// <inheritdoc cref="Popup.HorizontalOffset"/> |
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'm inheriting the docs from Popup now. The only downside is "context menu" wording is replaced by "popup". I don't consider this a major issue and it's better to find more general wording in the base docs than duplicate them everywhere.
@@ -256,8 +256,8 @@ public PlacementMode PlacementMode | |||
/// </remarks> | |||
public Rect? PlacementRect |
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.
PlacementRect
seems like an unnecessary deviation from naming conventions and WPF which uses PlacementRectangle
. Honestly, I would like to switch to WPF terminology: https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.popup.placementrectangle?view=windowsdesktop-7.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.
I guess there is precedent for the new naming: https://learn.microsoft.com/en-us/uwp/api/windows.ui.input.pointerpointproperties.contactrect?view=winrt-22621
PointerPointProperties.ContactRect
You can test this PR using the following package version. |
Can we have |
Really isn't ideal to support considering all the other breaking changes. I can't think of many cases where two styled properties exist that do the same thing either. That said if it's required it can be done. |
There won't be two separate properties, just an alias: |
@kekekeks Updated to add back an obsolete alias for PlacementMode |
You can test this PR using the following package version. |
This reverts commit b116a87.
You can test this PR using the following package version. |
What does the pull request do?
Follow-up to #10492 as discussed starting here: #10492 (comment)
What is the current behavior?
PlacementMode
andPlacement
are used interchangeably in a non-standardized wayPlacementMode
doesn't match WPF property namingWhat is the updated/expected behavior with this PR?
All properties standardized to use
Placement
naming.How was the solution implemented (if it's not obvious)?
Obvious.
Checklist
[ ] Added unit tests (if possible)?[ ] Consider submitting a PR to https://github.com/AvaloniaUI/Documentation with user documentationBreaking changes
Yes, property name change:
Obsoletions / Deprecations
None
Fixed issues
Also fixes #9583