Maui
Maui copied to clipboard
Fix Windows Media Element in MultiWindow Mode on exit Crash
- Bug fix
Description of Change
Track window count and manage snackbar notifications
Added a static NumberOfWindows
property to the Options
class to track the number of windows. Updated SetShouldEnableSnackbarOnWindows
to increment/decrement NumberOfWindows
on window creation/closure. Conditional registration/unregistration of AppNotificationManager
for snackbar notifications based on NumberOfWindows
count.
Linked Issues
- Fixes #2257
- Fixes #2279
PR Checklist
- [x] Has a linked Issue, and the Issue has been
approved
(bug) orChampioned
(feature/proposal) - [ ] Has tests (if omitted, state reason in description)
- [x] Has samples (if omitted, state reason in description)
- [x] Rebased on top of
main
at time of PR - [x] Changes adhere to coding standard
- [ ] Documentation created or updated: https://github.com/MicrosoftDocs/CommunityToolkit/pulls
Additional information
This PR uses a simple counter to track the number of windows that exist and only when one is remaining will it unregister Snackview