Fix WindowCloseReason Passed During System Shutdown by lindexi · Pull Request #19055 · AvaloniaUI/Avalonia (original) (raw)
What does the pull request do?
Fix #19027
What is the current behavior?
It can not pass the OSShutdown enum to WindowCloseReason of WindowClosingEventArgs.
What is the updated/expected behavior with this PR?
It can pass the OSShutdown enum to WindowCloseReason of WindowClosingEventArgs.
How was the solution implemented (if it's not obvious)?
Checklist
- Added unit tests (if possible)? Sorry, no.
- Added XML documentation to any related classes? No.
- Consider submitting a PR to https://github.com/AvaloniaUI/avalonia-docs with user documentation
Breaking changes
The WindowClosingEventArgs.CloseReason will change from WindowCloseReason.ApplicationShutdown to WindowCloseReason.OSShutdown when the System Shutdown.
Obsoletions / Deprecations
Fixed issues
Fix #19027