Corrected PointerPointProperties
inline documentation, and exposed it on PointerEventArgs
#19062
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.
I noticed some minor problems with
PointerPointProperties
while adding input handling code. This PR addresses them.The inline documentation of the various "IsXPressed" properties claimed that they indicated "whether the pointer input was triggered" by that button. This was wrong, as their values only indicate whether the relevant button was pressed at the time the event occurred. It's the
PointerUpdateKind
property which indicates which button press/release triggered the event.The only way to get a
PointerPointProperties
object for a pointer event was to call theGetCurrentPoint
method. This frustrates pattern matching, which only works with properties. There is no reason to hide an event's pointer properties behind a method because they are immutable, so I changed the existing property which stores them fromprotected
topublic
.What is the updated/expected behavior with this PR?
No changes to behaviour.
Breaking changes
None
Obsoletions / Deprecations
None