Open taublast opened 7 months ago
Duplicate of #999
reserved
@jfversluis - I agree with @taublast - this doesn't seem like a duplicate and, at least on its face, feels like sensible suggestion. Should we reopen, add [Enhancement]
to the title and move it to the backlog? I'm not suggesting we prioritize doing it, just keeping it open to gather more feedback.
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
Description
We have the docs: https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/app-lifecycle?view=net-maui-8.0 stating that the app window has cross-platform lifecycle events.
Actually only platform-dependent events can be hooked using
ConfigureLifecycleEvents
, cross-platform ones from the table above cannot and the reason seems unclear. We can consume these events only by overriding methods fromApp.cs
(IApplication
) but external code cannot access them. The suggestion is to create a class likeAppWindowLifecycle
similar to, for example,WindowsLifecycle
and start invoking these methods from the internal code.Intended Use-Case
Wanted to provide an easy way to enhance the Maui App main Window using
ConfigureLifecycleEvents
but the only way remains to code insideApp.cs
overrides.Also this would allow developers to consume lifecycle events in a more event-oriented manner instead of customizing
App.cs
.Remains a low-priority suggestion, but still.