Skip to content

Commit

Permalink
Remove Mica workaround
Browse files Browse the repository at this point in the history
No longer needed for Windows App SDK 1.3.230502000:
microsoft/microsoft-ui-xaml#8416 (comment)
  • Loading branch information
JasonWei512 committed May 10, 2023
1 parent 115d2ee commit f9706dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 5 additions & 1 deletion src/EnergyStarX/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
MinWidth="720"
MinHeight="480"
PersistenceId="MainWindow"
mc:Ignorable="d" />
mc:Ignorable="d">
<windowex:WindowEx.SystemBackdrop>
<MicaBackdrop />
</windowex:WindowEx.SystemBackdrop>
</windowex:WindowEx>
6 changes: 0 additions & 6 deletions src/EnergyStarX/Services/ActivationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;
using Microsoft.Windows.AppLifecycle;

namespace EnergyStarX.Services;
Expand Down Expand Up @@ -50,11 +49,6 @@ public async Task Activate(object activationArgs)
{
shell = App.GetService<ShellPage>();
App.MainWindow.Content = shell ?? new Frame();

// Windows App SDK 1.3's new SystemBackdrop API requires the window to have content.
// If I set MainWindow.SystemBackdrop when MainWindow.Content is null, the app may crash on launch.
// https://github.com/microsoft/WindowsAppSDK/discussions/3406#discussioncomment-4955796
App.MainWindow.SystemBackdrop = new MicaBackdrop();
}

// Handle activation via ActivationHandlers.
Expand Down

0 comments on commit f9706dc

Please sign in to comment.