Conversation
| } | ||
|
|
||
| /// <include file="../../docs/Microsoft.Maui.Controls/ClickGestureRecognizer.xml" path="Type[@FullName='Microsoft.Maui.Controls.ClickGestureRecognizer']/Docs" /> | ||
| public sealed class ClickGestureRecognizer : GestureRecognizer |
There was a problem hiding this comment.
This was only wired up to GTK and macOS in XF. Currently in .NET MAUI this gesture does nothing anywhere. I think just condensing down into the TapGestureRecognizer here makes the most sense.
f52c024 to
cfc17c5
Compare
| } | ||
| } | ||
|
|
||
| ButtonsMask AddFakeRightClickForMacCatalyst(IGestureRecognizer recognizer) |
There was a problem hiding this comment.
Most the changes in this file are organizational. There seemed to be a lot of duplicated code added to process spans. I needed that same code generalized so I could use it from a UIContextMenu.
The code here is the main code required to make right click fire an event on catalyst.
| // it only works when you have a mouse connected to an iPad | ||
| // so we just ignore setting the mask if the user is running catalyst | ||
| // right click is handled by adding a UIContextMenu interaction | ||
| if (OperatingSystem.IsIOSVersionAtLeast(13, 4) && !OperatingSystem.IsMacCatalyst()) |
There was a problem hiding this comment.
This is the other functional addition to the code. Most of the other changes in this file are organizational
hartez
left a comment
There was a problem hiding this comment.
Looks pretty good, a few small things.
src/Controls/src/Core/Platform/GestureManager/GestureManager.Windows.cs
Outdated
Show resolved
Hide resolved
| public event EventHandler<TappedEventArgs>? Tapped; | ||
|
|
||
| internal void SendTapped(View sender) | ||
| internal void SendTapped(View sender, Func<IElement?, Point?>? getPosition) |
There was a problem hiding this comment.
Can getPosition default to null and reduce the noise of all the SendTapped(..., null) calls?
There was a problem hiding this comment.
👍
Also @rookiejava FYI if you want to extend your usages of "SendTapped" to provide location data.
|
|
||
| bool CheckButtonMask(TapGestureRecognizer tapGestureRecognizer, MotionEvent? motionEvent) | ||
| { | ||
| if (tapGestureRecognizer.Buttons == ButtonsMask.Secondary) |
| set { SetValue(ButtonsProperty, value); } | ||
| } | ||
|
|
||
| public event EventHandler<TappedEventArgs>? Tapped; |
There was a problem hiding this comment.
So @PureWeen was this meant to be a breaking change hosing any .NET 6 components?

Description of Change
This adds
ButtonMasktoTapGestureRecognizerwhich allows users to indicate if they wantsecondaryand/orprimaryto trigger the gesture.ClickGestureRecognizer. This wasn't hooked up to anything in .NET MAUI so we're not removing any behavior by deleting this recognizer. It seems a bit excessive and confusing to have a separate recognizer here. Once we get to a point where a user will need to determinate the type of device triggering aTapwe can just add anenumor similar.Status
API Changes
Maui.Controls
Issues Fixed
Fixes #9140