Closed rocksdanister closed 2 years ago
@rocksdanister Thank you for the great error report. I pushed a fix. I'm overhauling the backdrop API quite a lot though to give you more control, and the fix will be in the next update. For now, try setting the backdrop to default and back again to "restore" it right before calling Show.
@dotMorten
I have the exact same problem in v1.8.0.
To workaround this bug I have to set Window.Backdrop
to new MicaSystemBackdrop()
after calling Show()
.
@JasonWei512 Could you provide a repro? The above repro was used to verify the fix.
Reproduction: https://github.com/JasonWei512/WinUIExMicaBackdropBug
MainWindow.Closed += (sender, args) =>
{
args.Handled = true;
MainWindow.Hide();
};
// Mica backdrop effect will disappear
MainWindow.Close();
await Task.Delay(TimeSpan.FromSeconds(1));
MainWindow.Show();
// Workaround
MainWindow.Close();
await Task.Delay(TimeSpan.FromSeconds(1));
MainWindow.Show();
MainWindow.Backdrop = new MicaSystemBackdrop();
Bug: Mica/Acrylic backdrop stops working when Window is hidden then shown again using Closed event.
Use case: Application runs UI as a separate WinUI program and has the option to hide the program instead of closing when not in use.
Example to reproduce: