# Maui Gestures

> >

- **Type:** Skill
- **Install:** `agentstack add skill-davidortinau-maui-skills-maui-gestures`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [davidortinau](https://agentstack.voostack.com/s/davidortinau)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [davidortinau](https://github.com/davidortinau)
- **Source:** https://github.com/davidortinau/maui-skills/tree/main/plugins/maui-skills/skills/maui-gestures

## Install

```sh
agentstack add skill-davidortinau-maui-skills-maui-gestures
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# .NET MAUI Gesture Recognizers

## Deprecated API Warning

> ⚠️ In .NET 10, `ClickGestureRecognizer` is **deprecated**. Use
> `TapGestureRecognizer` (touch/stylus) and `PointerGestureRecognizer`
> (mouse hover/press) instead.

---

## Common Mistakes

### One `SwipeGestureRecognizer` per direction

A single recognizer handles only one direction. Adding multiple directions to
one recognizer silently fails on most platforms.

```xml

```

### `AllowDrop` defaults to `false`

Drop targets silently ignore drops if you forget this property.

```xml

  
    
  

  
    
  

```

### Using `TapGestureRecognizer` for hover effects

Tap recognizers don't track pointer movement. Use `PointerGestureRecognizer`
for hover effects — it also enables the `PointerOver` visual state.

```xml

  
    
  

  
    
  

```

---

## Platform Differences That Bite

### Pan delta coordinates differ by platform

| 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.

### Pointer hover is mouse/trackpad only

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.

### Cross-app drag-and-drop

| Platform | Supported |
|---|---|
| iPadOS / Mac Catalyst | ✅ Yes |
| Windows | ✅ Yes |
| Android | ❌ No |

### Secondary button (right-click)

| Platform | Behaviour |
|---|---|
| iOS / Mac Catalyst | `Buttons = ButtonsMask.Secondary` works |
| Windows | `Buttons = ButtonsMask.Secondary` works |
| Android | Falls back to long-press — no true right-click |

---

## Gesture Combination Conflicts

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.

---

## MVVM Best Practice

Prefer **commands** over events for testable view models. Both work
identically at runtime, but commands are easier to mock and test.

```xml

```

---

## Quick Rules

1. One `SwipeGestureRecognizer` per direction
2. `PointerGestureRecognizer` for hover, not `TapGestureRecognizer`
3. `AllowDrop="True"` on drop targets — it defaults to `false`
4. Normalize pan deltas on Android (relative to previous event, not start)
5. Prefer commands over events for MVVM
6. Use `TapGestureRecognizer` instead of deprecated `ClickGestureRecognizer` (.NET 10)
7. Don't rely on `PointerMoved` for touch-based UI — hover doesn't track

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [davidortinau](https://github.com/davidortinau)
- **Source:** [davidortinau/maui-skills](https://github.com/davidortinau/maui-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-davidortinau-maui-skills-maui-gestures
- Seller: https://agentstack.voostack.com/s/davidortinau
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
