maui-gestures

Implement gesture recognizers for .NET MAUI apps in XAML and C#.

Updated Nov 27, 2025
One-click install
npx skills add https://github.com/seydakaratekeli/KamPay3 --skill maui-gestures-seydakaratekeli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-gestures
Source: https://github.com/seydakaratekeli/KamPay3/tree/main/KamPay/.github/skills/maui-gestures%20-%20Kopyala
Command: npx skills add https://github.com/seydakaratekeli/KamPay3 --skill maui-gestures-seydakaratekeli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Helps developers implement reliable touch, pointer, and drag-and-drop gesture handling in .NET MAUI apps while avoiding platform-specific pitfalls and common mistakes that silently break user interactions.

Core Features & Use Cases

  • Cross-platform guidance: Explains XAML and C# patterns for Tap, Swipe, Pan, Pinch, DragGesture, DropGesture, and PointerGesture so gestures behave consistently on iOS, Android, Mac Catalyst, and Windows.
  • Platform pitfalls & fixes: Documents important differences such as Android pan delta semantics, per-direction swipe requirements, pointer hover limitations on touch devices, and cross-app drag-and-drop support.
  • MVVM & testing best practices: Recommends command bindings over events for testable view models and highlights configuration details like AllowDrop and replacement of deprecated ClickGestureRecognizer.
  • Integration scenarios: Useful for building interactive galleries, card swipe interfaces, image manipulation (pan/pinch), and drag-and-drop file workflows in enterprise apps.

Quick Start

Show me XAML and C# examples for implementing Tap, separate-direction Swipe, Pan with Android delta normalization, and Pointer hover for a cross-platform .NET MAUI view plus brief notes on AllowDrop and MVVM command usage.

Frequently Asked Questions about maui-gestures

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement separate swipe recognizers for each direction in .NET MAUI?

To implement directional swipes in .NET MAUI, you need separate SwipeGestureRecognizer instances for each direction rather than a single recognizer. This ensures per-direction swipe requirements are met consistently across iOS, Android, Mac Catalyst, and Windows.

What is the best way to handle pointer hover effects in a .NET MAUI cross-platform app?

Pointer hover effects in .NET MAUI are handled using the PointerGestureRecognizer. This approach enables hover interactions across platforms, though it has inherent limitations on touch-only devices where hover behavior is not natively supported.

Why does my pan gesture delta behave differently on Android in .NET MAUI?

Pan gesture delta values behave differently on Android due to platform-specific semantics that require delta normalization. Adjusting these values ensures consistent pan gesture behavior across iOS, Android, Mac Catalyst, and Windows.

Can I use MVVM command bindings instead of events for .NET MAUI tap gestures?

Yes, you can and should prefer command bindings over direct events for .NET MAUI tap gestures. Using commands instead of deprecated ClickGestureRecognizer events ensures your view models remain testable and follow MVVM best practices.

How do I enable drag-and-drop targeting for files in .NET MAUI applications?

To enable drag-and-drop targeting in .NET MAUI, you must set the AllowDrop property on your target element and implement DragGesture and DropGesture handlers. This supports cross-app file workflows on iOS, Android, Mac Catalyst, and Windows.