Document CancellationToken support for view animations in .NET MAUI 11 - #3368
Conversation
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>
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 status updates of commit 1ef7c1c: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe 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 foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit fe04080: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe 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 foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit c101919: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe 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 foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
There was a problem hiding this comment.
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.0subsection explainingCancellationToken-aware*Asyncview 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Learn Build status updates of commit 4105c4b: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe 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 foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
Adds a new "Cancel an animation with a
CancellationToken" subsection under "Canceling animations" indocs/user-interface/animation/basic.md. The section explains that theAsync-suffixed animation methods (FadeToAsync,RotateToAsync,ScaleToAsync,TranslateToAsync, and the relative variants) accept an optionalCancellationTokenin .NET MAUI 11, with a runnable snippet and a note that the non-Asyncoverloads are now[Obsolete].Tracks dotnet/maui#33372 and aligns with the .NET 11 Preview 5 release notes (dotnet/core#10433).
Internal previews