[Run] Switch to WPF UI theme manager (#30520)

* Switch to WPF UI theme manager

* fix

* add theme manager

* fix

* fix

* update error icon

* moved image initialization

* cleanup
This commit is contained in:
Davide Giacometti
2023-12-21 13:56:48 +01:00
committed by GitHub
parent e73e73fa6c
commit ae21b0dc09
12 changed files with 153 additions and 123 deletions

View File

@@ -7,7 +7,6 @@ using System.Collections.Generic;
using System.Linq;
using Common.UI;
using ImageResizer.ViewModels;
using ManagedCommon;
using Microsoft.Win32;
using Wpf.Ui.Controls;
using AppResources = ImageResizer.Properties.Resources;
@@ -31,15 +30,7 @@ namespace ImageResizer.Views
WindowBackdropType = WindowBackdropType.None;
}
// workaround for #30177
try
{
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this, WindowBackdropType);
}
catch (Exception ex)
{
Logger.LogError($"Exception in SystemThemeWatcher.Watch, issue 30177. {ex.Message}");
}
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this, WindowBackdropType);
}
public IEnumerable<string> OpenPictureFiles()