npx claudepluginhub davidortinau/maui-skills --plugin maui-skillsThis skill uses the workspace's default tool permissions.
> ⚠️ In .NET 10, `ClickGestureRecognizer` is **deprecated**. Use
Guides .NET MAUI XAML/C# data bindings: compiled x:DataType, INotifyPropertyChanged/ObservableObject, converters, modes, relative bindings, fallbacks, and MVVM practices.
Guards .NET MAUI projects against deprecated, obsolete, or removed APIs in XAML/C#, Blazor Hybrid, and MauiReactor. Detects target frameworks/library versions and provides replacement patterns for code generation/review/editing.
Implements SwiftUI gestures (tap, drag, long press, magnification, rotation); composes with .simultaneously/.sequenced/.exclusively; manages @GestureState; debugs conflicts; adds VoiceOver accessibility.
Share bugs, ideas, or general feedback.
⚠️ In .NET 10,
ClickGestureRecognizeris deprecated. UseTapGestureRecognizer(touch/stylus) andPointerGestureRecognizer(mouse hover/press) instead.
SwipeGestureRecognizer per directionA single recognizer handles only one direction. Adding multiple directions to one recognizer silently fails on most platforms.
<!-- ❌ Only fires for Left — Right is ignored -->
<SwipeGestureRecognizer Direction="Left,Right" Swiped="OnSwiped" />
<!-- ✅ Separate recognizer per direction -->
<SwipeGestureRecognizer Direction="Left" Swiped="OnSwiped" />
<SwipeGestureRecognizer Direction="Right" Swiped="OnSwiped" />
AllowDrop defaults to falseDrop targets silently ignore drops if you forget this property.
<!-- ❌ Drop never fires — AllowDrop defaults to false -->
<StackLayout>
<StackLayout.GestureRecognizers>
<DropGestureRecognizer Drop="OnDrop" />
</StackLayout.GestureRecognizers>
</StackLayout>
<!-- ✅ Explicitly enable drops -->
<StackLayout>
<StackLayout.GestureRecognizers>
<DropGestureRecognizer AllowDrop="True" Drop="OnDrop" />
</StackLayout.GestureRecognizers>
</StackLayout>
TapGestureRecognizer for hover effectsTap recognizers don't track pointer movement. Use PointerGestureRecognizer
for hover effects — it also enables the PointerOver visual state.
<!-- ❌ No hover tracking — user must tap to trigger -->
<Border>
<Border.GestureRecognizers>
<TapGestureRecognizer Command="{Binding HoverCommand}" />
</Border.GestureRecognizers>
</Border>
<!-- ✅ Proper hover detection + visual state -->
<Border>
<Border.GestureRecognizers>
<PointerGestureRecognizer PointerEnteredCommand="{Binding HoverInCommand}"
PointerExitedCommand="{Binding HoverOutCommand}" />
</Border.GestureRecognizers>
</Border>
| Platform | TotalX / TotalY relative to |
|---|---|
| iOS / Mac Catalyst | Start of gesture |
| Android | Previous event (not start!) |
| Windows | Start of gesture |
If sub-pixel accuracy matters, normalize Android deltas by accumulating them
manually rather than using TotalX/TotalY directly.
On touch devices, PointerGestureRecognizer events fire on press/release
but hover is not tracked between touches. Don't rely on PointerMoved
for touch-based UI.
| Platform | Supported |
|---|---|
| iPadOS / Mac Catalyst | ✅ Yes |
| Windows | ✅ Yes |
| Android | ❌ No |
| Platform | Behaviour |
|---|---|
| iOS / Mac Catalyst | Buttons = ButtonsMask.Secondary works |
| Windows | Buttons = ButtonsMask.Secondary works |
| Android | Falls back to long-press — no true right-click |
Combining pan + swipe on the same view conflicts on Android — the swipe may consume the gesture before pan starts. Test on all platforms, or use only one at a time.
Combining tap + pan works well — tap fires on quick taps, pan fires on sustained drags.
Prefer commands over events for testable view models. Both work identically at runtime, but commands are easier to mock and test.
<!-- ✅ Bindable command — testable -->
<TapGestureRecognizer Command="{Binding TapCommand}" />
<!-- ⚠️ Event handler — requires code-behind, harder to unit-test -->
<TapGestureRecognizer Tapped="OnTapped" />
SwipeGestureRecognizer per directionPointerGestureRecognizer for hover, not TapGestureRecognizerAllowDrop="True" on drop targets — it defaults to falseTapGestureRecognizer instead of deprecated ClickGestureRecognizer (.NET 10)PointerMoved for touch-based UI — hover doesn't track