ui/winui/window.cpp

branch
newapi
changeset 200
f40dadf3498f
parent 195
0f2e69873875
child 205
b1ac0dd1d38b
--- a/ui/winui/window.cpp	Tue Oct 03 14:18:25 2023 +0200
+++ b/ui/winui/window.cpp	Tue Oct 03 15:32:46 2023 +0200
@@ -36,6 +36,7 @@
 #include <winrt/Microsoft.UI.Xaml.Controls.Primitives.h>
 #include <winrt/Microsoft.UI.Xaml.XamlTypeInfo.h>
 #include <winrt/Microsoft.UI.Xaml.Markup.h>
+#include <winrt/Microsoft.UI.Xaml.Media.h>
 
 #include "appmenu.h"
 #include "container.h"
@@ -72,6 +73,10 @@
 		free(wtitle);
 	}
 
+	auto backdrop = winrt::Microsoft::UI::Xaml::Media::MicaBackdrop();
+	backdrop.Kind(winrt::Microsoft::UI::Composition::SystemBackdrops::MicaKind::Base); // alternative: BaseAlt
+	// TODO: https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/system-backdrop-controller#example-use-mica-in-a-windows-appsdkwinui-3-app
+
 	Grid grid = Grid();
 	window.Content(grid);
 

mercurial