dotMorten / WinUIEx

WinUI Extensions
https://dotmorten.github.io/WinUIEx
MIT License
572 stars 36 forks source link

The `Backdrop` is cleared when the window cancel close #107

Closed Wenveo closed 1 year ago

Wenveo commented 1 year ago

When I set the args.Handle to true in the Closed event handler

Just like...

var window = new MainWindow();
window.Closed += OnClosed;

private void OnClosed(object sender, WindowEventArgs args)
{
    args.Handle = true;
}

The window is not close, But the Backdrop will be cleanup. https://github.com/dotMorten/WinUIEx/blob/3173bb17e8fde2bcb1c75a7aa7e054327bf7ba92/src/WinUIEx/WindowManager.cs#L92-L96

dotMorten commented 1 year ago

Closing - Backdrop APIs has been deprecated in favor of Microsoft's own backdrop APIs