gagaddji2
This commit is contained in:
parent
31444d2aa9
commit
87c66733eb
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue