Disable Mica before close the window to resolve a crash

This commit is contained in:
Kenny Guo 2021-07-26 21:06:49 +08:00
commit 3cf580e541

View file

@ -440,6 +440,10 @@ namespace CalculatorApp
mainPage.UnregisterEventHandlers();
// TODO, remove this workaround after Mica fix
// Workaround app crash caused by Mica in multi-view case.
Microsoft.UI.Xaml.Controls.BackdropMaterial.SetApplyToRootOrPageBackground(mainPage, false);
await frameService.HandleViewRelease();
await Task.Run(() =>
{