How to intercept app_closing
or app_entering_background
in WinUi 3 app.
In UWP apps we do have Application_EnteredBackground
event , in which we can intercept app close, we use GetDeferral()
to save data .
Is there any same kind of event in WinUI 3 apps, I need to save data on app close, or entering background.
Tried window_VisibilityChanged
and window_Closed
events, but not able to use GetDeferral()
.
Kindly help
Thanks in advance .
Noorul