Skip to content

Add LongPressGestureRecognizer documentation for .NET 11#3215

Open
jfversluis wants to merge 5 commits intomainfrom
copilot/longpress-gesture-docs
Open

Add LongPressGestureRecognizer documentation for .NET 11#3215
jfversluis wants to merge 5 commits intomainfrom
copilot/longpress-gesture-docs

Conversation

@jfversluis
Copy link
Copy Markdown
Member

@jfversluis jfversluis commented Mar 4, 2026

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description

Adds comprehensive documentation for the new LongPressGestureRecognizer introduced in .NET MAUI 11 (dotnet/maui#33432).

Content added

  • New page: docs/fundamentals/gestures/long-press.md
    • API reference for all properties (Command, CommandParameter, MinimumPressDuration, NumberOfTouchesRequired, AllowableMovement, State)
    • Two events: LongPressed and LongPressing with their EventArgs
    • XAML and C# code examples
    • Gesture state tracking guide
    • Position detection via GetPosition
    • Combining with other gestures (tap + long press)
    • Platform differences table (Android / iOS / Mac Catalyst / Windows)
  • TOC update: Added "Long press" entry in the Gestures section

Versioning

All content is gated behind ::: moniker range=">=net-maui-11.0" with a fallback message for earlier versions.

Related


Internal previews

📄 File 🔗 Preview link
docs/fundamentals/gestures/long-press.md docs/fundamentals/gestures/long-press

Add comprehensive documentation for the new LongPressGestureRecognizer
including API reference, XAML/C# examples, gesture state tracking,
position detection, combining with other gestures, and a platform
differences table. Content is gated behind net-maui-11.0 moniker.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jfversluis jfversluis requested a review from a team as a code owner March 4, 2026 12:42
@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 2a85bbe:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/fundamentals/gestures/long-press.md ⚠️Warning View (>=net-maui-8.0) Details
docs/TOC.yml ✅Succeeded View (>=net-maui-8.0)

docs/fundamentals/gestures/long-press.md

  • Line 11, Column 189: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer'.
  • Line 13, Column 5: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer'.
  • Line 15, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.Command'.
  • Line 16, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.CommandParameter'.
  • Line 17, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.MinimumPressDuration'.
  • Line 18, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.NumberOfTouchesRequired'.
  • Line 19, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.AllowableMovement'.
  • Line 20, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.State'.
  • Line 24, Column 5: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer'.
  • Line 26, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.LongPressed'.
  • Line 26, Column 195: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressedEventArgs'.
  • Line 27, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.LongPressing'.
  • Line 27, Column 127: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressingEventArgs'.
  • Line 31, Column 88: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer'.
  • Line 31, Column 165: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.LongPressed'.
  • Line 31, Column 360: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer'.
  • Line 63, Column 5: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.Command'.
  • Line 76, Column 5: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.MinimumPressDuration'.
  • Line 88, Column 19: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.MinimumPressDuration'.
  • Line 92, Column 5: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.LongPressing'.
  • Line 92, Column 139: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressingEventArgs.Status'.
  • Line 99, Column 90: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.AllowableMovement'.
  • Line 131, Column 112: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressedEventArgs'.
  • Line 131, Column 167: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressingEventArgs'.
  • Line 151, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer'.

This comment lists only the first 25 errors (including error/warning/suggestion) in the pull request.
For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 184f46a:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/fundamentals/gestures/long-press.md ⚠️Warning View (>=net-maui-8.0) Details
docs/TOC.yml ✅Succeeded View (>=net-maui-8.0)

docs/fundamentals/gestures/long-press.md

  • Line 11, Column 189: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer'.
  • Line 13, Column 5: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer'.
  • Line 15, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.Command'.
  • Line 16, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.CommandParameter'.
  • Line 17, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.MinimumPressDuration'.
  • Line 18, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.NumberOfTouchesRequired'.
  • Line 19, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.AllowableMovement'.
  • Line 20, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.State'.
  • Line 24, Column 5: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer'.
  • Line 26, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.LongPressed'.
  • Line 26, Column 195: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressedEventArgs'.
  • Line 27, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.LongPressing'.
  • Line 27, Column 127: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressingEventArgs'.
  • Line 31, Column 88: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer'.
  • Line 31, Column 165: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.LongPressed'.
  • Line 31, Column 360: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer'.
  • Line 63, Column 5: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.Command'.
  • Line 76, Column 5: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.MinimumPressDuration'.
  • Line 88, Column 19: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.MinimumPressDuration'.
  • Line 92, Column 5: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.LongPressing'.
  • Line 92, Column 139: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressingEventArgs.Status'.
  • Line 99, Column 90: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer.AllowableMovement'.
  • Line 131, Column 112: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressedEventArgs'.
  • Line 131, Column 167: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressingEventArgs'.
  • Line 151, Column 3: [Warning: xref-not-found - See documentation] Cross reference not found: 'Microsoft.Maui.Controls.LongPressGestureRecognizer'.

This comment lists only the first 25 errors (including error/warning/suggestion) in the pull request.
For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

The LongPressGestureRecognizer API reference is not yet published,
causing xref-not-found build warnings. Replace with backtick-formatted
type names; existing published xrefs (GestureStatus, View, etc.) are
kept as-is.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 24f30a8:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/fundamentals/gestures/long-press.md ⚠️Warning View (>=net-maui-8.0) Details
docs/TOC.yml ✅Succeeded View (>=net-maui-8.0)

docs/fundamentals/gestures/long-press.md

  • Line 179, Column 1: [Warning: moniker-zone-empty] No intersection between zone and file level monikers. The result of zone level range string '<net-maui-11.0' is '', while file level monikers is 'net-maui-10.0', 'net-maui-8.0', 'net-maui-9.0'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 4db2bb0:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/fundamentals/gestures/long-press.md ⚠️Warning View (>=net-maui-8.0) Details
docs/TOC.yml ✅Succeeded View (>=net-maui-8.0)

docs/fundamentals/gestures/long-press.md

  • Line 179, Column 1: [Warning: moniker-zone-empty] No intersection between zone and file level monikers. The result of zone level range string '<net-maui-11.0' is '', while file level monikers is 'net-maui-10.0', 'net-maui-8.0', 'net-maui-9.0'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

The <net-maui-11.0 range has no intersection with file-level monikers.
Use <=net-maui-10.0 which correctly targets pre-.NET 11 versions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit ce87f5e:

✅ Validation status: passed

File Status Preview URL Details
docs/fundamentals/gestures/long-press.md ✅Succeeded View (>=net-maui-8.0)
docs/TOC.yml ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant