From 66c2f5915e97fa75a3257ab9c91d61c7fc852f77 Mon Sep 17 00:00:00 2001 From: Kenny Guo <83218270+guominrui@users.noreply.github.com> Date: Tue, 27 Jul 2021 11:06:46 +0800 Subject: [PATCH] Disable Mica before close the window to resolve a crash (#1619) --- src/Calculator/App.xaml.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Calculator/App.xaml.cs b/src/Calculator/App.xaml.cs index a4586952..21702b66 100644 --- a/src/Calculator/App.xaml.cs +++ b/src/Calculator/App.xaml.cs @@ -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(() => {