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

Rename to PointerEntered and PointerExited #8396

Merged
merged 3 commits into from
Jun 27, 2022

Conversation

robloo
Copy link
Contributor

@robloo robloo commented Jun 26, 2022

Warning: This is a big breaking change for almost all apps and libraries.

What does the pull request do?

Per discussion in #7907 and issue #8058, this standardizes event naming with WPF/UWP/WinUI as follows:

  1. PointerEnter -> PointerEntered
  2. PointerLeave -> PointerExited

Several secondary members and unit tests were also renamed to match.

What is the current behavior?

Two pointer events use the non-standardized PointerEnter and PointerLeave terminology.

What is the updated/expected behavior with this PR?

The two pointer events use standardized PointerEntered and PointerExited terminology aligning with other XAML frameworks.

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

Find and replace.

Checklist

Breaking changes

Yes, this is a bad one for breaking changes.

Obsoletions / Deprecations

None

Fixed issues

Closes #8058

@avaloniaui-team
Copy link
Contributor

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

@maxkatz6
Copy link
Member

this standardizes event naming with WPF/UWP/WinUI as follows

WPF used MouseEnter. But since we went UWP/WinUI route, I also would prefer PoitnerEntered.

@robloo
Copy link
Contributor Author

robloo commented Jun 27, 2022

this standardizes event naming with WPF/UWP/WinUI as follows

WPF used MouseEnter. But since we went UWP/WinUI route, I also would prefer PoitnerEntered.

Thanks, that actually would have been a good conversation point in the issue or discussion. It explains where the original naming in Avalonia comes from. I guess it's been too long since I used this in WPF and assumed it was the same as UWP.

Nevertheless, agree that the new "Pointer" term is from UWP/WinUI along with the overall design and event args, multi-touch, etc. So as it is now it is kind-of a mix of WPF + UWP. As you said, it makes sense then just to standardize around the modern terminology and UWP/WinUI design used elsewhere.

@maxkatz6 maxkatz6 enabled auto-merge June 27, 2022 22:21
@maxkatz6 maxkatz6 merged commit 035059f into AvaloniaUI:master Jun 27, 2022
@avaloniaui-team
Copy link
Contributor

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

@robloo robloo deleted the rename-entered-exited-events branch June 27, 2022 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standardize Pointer Event Names with WinUI
3 participants