Skip to content

Document CancellationToken support for view animations in .NET MAUI 11 - #3368

Merged
jfversluis merged 4 commits into
dotnet:mainfrom
davidortinau:daortin/p5-animation-cancellation
Jun 11, 2026
Merged

Document CancellationToken support for view animations in .NET MAUI 11#3368
jfversluis merged 4 commits into
dotnet:mainfrom
davidortinau:daortin/p5-animation-cancellation

Conversation

@davidortinau

Copy link
Copy Markdown
Contributor

Adds a new "Cancel an animation with a CancellationToken" subsection under "Canceling animations" in docs/user-interface/animation/basic.md. The section explains that the Async-suffixed animation methods (FadeToAsync, RotateToAsync, ScaleToAsync, TranslateToAsync, and the relative variants) accept an optional CancellationToken in .NET MAUI 11, with a runnable snippet and a note that the non-Async overloads are now [Obsolete].

Tracks dotnet/maui#33372 and aligns with the .NET 11 Preview 5 release notes (dotnet/core#10433).

Internal previews

Adds a new "Cancel an animation with a CancellationToken" subsection
under "Canceling animations" that explains the new Async-suffixed
animation methods (FadeToAsync, RotateToAsync, ScaleToAsync,
TranslateToAsync, and the relative variants) accept an optional
CancellationToken in .NET MAUI 11. Includes a runnable snippet and a
note that the non-Async overloads are now [Obsolete].

Tracks dotnet/maui#33372 and aligns with the .NET 11 Preview 5
release notes published in dotnet/core#10433.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@davidortinau
davidortinau requested a review from a team as a code owner June 7, 2026 11:50
FadeToAsync and the other cancellation-aware overloads return Task<bool>
(true on cancel, false on completion) — they do not throw
TaskCanceledException. Verified against ViewExtensions.AnimateToAsync on
release/11.0.1xx-preview5.

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

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 1ef7c1c:

✅ Validation status: passed

File Status Preview URL Details
docs/user-interface/animation/basic.md ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

@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 fe04080:

✅ Validation status: passed

File Status Preview URL Details
docs/user-interface/animation/basic.md ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

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

Copilot AI review requested due to automatic review settings June 11, 2026 15:18
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit c101919:

✅ Validation status: passed

File Status Preview URL Details
docs/user-interface/animation/basic.md ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the .NET MAUI “Basic animation” documentation to describe new .NET MAUI 11 support for canceling awaited view animations via CancellationToken, alongside existing guidance for CancelAnimations().

Changes:

  • Adds a new >=net-maui-11.0 subsection explaining CancellationToken-aware *Async view animation overloads and their return value behavior.
  • Includes a new code sample demonstrating canceling an in-progress fade via a button action.
  • Updates the page metadata date.

Comment thread docs/user-interface/animation/basic.md
Comment thread docs/user-interface/animation/basic.md Outdated
Comment thread docs/user-interface/animation/basic.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 4105c4b:

✅ Validation status: passed

File Status Preview URL Details
docs/user-interface/animation/basic.md ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

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

@jfversluis
jfversluis merged commit 79e1227 into dotnet:main Jun 11, 2026
7 checks passed
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.

4 participants