gagaddji2

This commit is contained in:
jess 2026-04-23 07:53:59 -07:00
parent 31444d2aa9
commit 87c66733eb
1 changed files with 11 additions and 3 deletions

View File

@ -2,6 +2,7 @@ using System;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.UI;
using Microsoft.UI.Composition.SystemBackdrops;
using Microsoft.UI.Windowing;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
@ -60,10 +61,17 @@ public sealed partial class MainWindow : Window
try
{
SystemBackdrop = new MicaBackdrop { Kind = Microsoft.UI.Composition.SystemBackdrops.MicaKind.Base };
App.Log("SystemBackdrop assigned");
if (MicaController.IsSupported())
{
SystemBackdrop = new MicaBackdrop { Kind = Microsoft.UI.Composition.SystemBackdrops.MicaKind.Base };
App.Log("SystemBackdrop assigned");
}
else
{
App.Log("Mica not supported on this machine; skipping backdrop");
}
}
catch (Exception ex) { App.Log($"SystemBackdrop FAILED: {ex}"); throw; }
catch (Exception ex) { App.Log($"SystemBackdrop FAILED: {ex}"); }
Activated += OnActivated;
Closed += OnClosed;