用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill maui-gestures命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
正在显示 SKILL.md
| name | maui-gestures |
| description | > Use when this capability is needed. |
⚠️ 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 trackConverted and distributed by TomeVault — claim your Tome and manage your conversions.