Page.Unloaded does not fire when app is closed
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 290
Description
### Description
I have some events that I subscribe to when the page is loaded, and then want to unsubscribe when the page is unloaded. Normal navigation seems to work, but when the app is closed none of the unloaded events fire.
Not sure what _should_ happen, but this breaks the loaded/unloaded event pairing.
_need to test other xaml frameworks_
### Steps to Reproduce
1. Attach events to Loaded and Unloaded
2. F5
3. Observe Loaded fire
4. Close the app
5. Observe no Unloaded fire
### Link to public reproduction project repository
:)
### Version with bug
6.0.486 (current)
### Last version that worked well
Unknown/Other
### Affected platforms
Windows, I was *not* able test on other platforms
### Affected platform versions
All
### Did you find any workaround?
_No response_
### Relevant log output
_No response_
Contributor guide
Research direction
Start with the Windows reproduction described in the issue and trace the Loaded/Unloaded lifecycle during normal navigation versus app close. First establish the expected close behavior, then verify the event sequence on Windows and check whether the behavior differs across the XAML frameworks mentioned; done means the expected pairing is consistently demonstrated or documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100