diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
index 760d356..0678793 100644
--- a/src/Directory.Build.targets
+++ b/src/Directory.Build.targets
@@ -18,8 +18,8 @@
Morten Nielsen - https://xaml.dev
Morten Nielsen - https://xaml.dev
logo.png
- 2.0.0
- 1.8.0
+ 2.0.1
+ 2.0.0
diff --git a/src/WinUIEx/WinUIEx.csproj b/src/WinUIEx/WinUIEx.csproj
index c6c73ec..1424f43 100644
--- a/src/WinUIEx/WinUIEx.csproj
+++ b/src/WinUIEx/WinUIEx.csproj
@@ -1,5 +1,5 @@
-
+
net6.0-windows10.0.18362.0
@@ -22,13 +22,7 @@
WinUIEx
WinUI Extensions
- - Major version update. Requires Windows App SDK v1.2.
- - BREAKING: Removed `MediaPlayerElement` control (now included in Windows App SDK 1.2).
- - BREAKING: Remove obsolete APIs (tray icon and WindowEx.TitleBar).
- - Add support for trimming.
- - Fix issue where MicaAlt wasn't applied. Setting Kind on the Mica backdrop will now change the backdrop settings for properties that hasn't been explicitly overridden (matches Windows App SDK behavior). (Issue #88)
- - Adds support for defining a maximum width and height of the window. (Issue #81)
- - Remove workarounds for issues now addressed in Windows App SDK v1.2.
+ - Ensure backdrop is always initialized during startup (Issue #90)
diff --git a/src/WinUIEx/WindowManager.cs b/src/WinUIEx/WindowManager.cs
index 2d6f68a..971fa09 100644
--- a/src/WinUIEx/WindowManager.cs
+++ b/src/WinUIEx/WindowManager.cs
@@ -70,12 +70,20 @@ private WindowManager(Window window, WindowMessageMonitor monitor)
_monitor.WindowMessageReceived += OnWindowMessage;
_window.Activated += Window_Activated;
_window.Closed += Window_Closed;
+ _window.VisibilityChanged += Window_VisibilityChanged;
AppWindow.Changed += AppWindow_Changed;
overlappedPresenter = AppWindow.Presenter as OverlappedPresenter ?? Microsoft.UI.Windowing.OverlappedPresenter.Create();
managers[window.GetWindowHandle()] = new WeakReference(this);
}
+ private void Window_VisibilityChanged(object sender, WindowVisibilityChangedEventArgs args)
+ {
+ // Ensures backdrop gets set up if it was previously attempted initialized while window wasn't visible
+ if (args.Visible && m_backdrop is not null && currentController is null)
+ InitBackdrop();
+ }
+
private void Window_Activated(object sender, WindowActivatedEventArgs args)
{
if (BackdropConfiguration != null)