Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dotnet/maui-app-lifecycle
.NET MAUI app lifecycle guidance — the four app states, cross-platform Window lifecycle events (Created, Activated, Deactivated, Stopped, Resumed, Destroying), platform-specific lifecycle mapping, backgrounding and resume behavior, and state-preservation patterns. USE FOR: "app lifecycle", "window lifecycle events", "save state on background", "resume app", "OnStopped", "OnResumed", "backgrounding", "deactivated event", "ConfigureLifecycleEvents", "platform lifecycle hooks". DO NOT USE FOR: navi
Passed 23 of 23 test cases with the skill, and 19 of 23 without it.
and 3 more in the full report
4 fixed19 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
I need to register Windows-specific native lifecycle hooks inside MauiProgram.cs using ConfigureLifecycleEvents for a .NET MAUI application. What builder extension method name is used for Windows native events, and how do you attach to the window launch and window closed events?
| Checked | Without skill | With skill |
|---|---|---|
| The code calls .AddWindows() within ConfigureLifecycleEvents. | Passed | Passed |
| The code attaches to native events using .OnLaunched() and .OnClosed(). | Missed | Passed |
The instructions your model reads when the skill loads.
Handle application state transitions correctly in .NET MAUI. This skill covers the cross-platform Window lifecycle events, their platform-native mappings, and patterns for preserving state across backgrounding and resume cycles.
ConfigureLifecycleEventsA .NET MAUI app moves through four states:
| State | Description |
|---|---|
| Not Running | Process does not exist |
| Running | Foreground, receiving input |
| Deactivated | Visible but lost focus (dialog, split-screen, notification shade) |
| Stopped | Fully backgrounded, UI not visible |
Typical flow: Not Running → Running → Deactivated → Stopped → Running (resumed) or Not Running (terminated).
Microsoft.Maui.Controls.Window exposes six cross-platform events:
test cases passed, vs 19 / 23 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.