Added theming support

This commit is contained in:
Niels Laute
2020-11-07 15:51:38 +01:00
parent 65ce8c760d
commit 36fd030075
11 changed files with 449 additions and 53 deletions

View File

@@ -13,8 +13,12 @@ using ImageResizer.Views;
namespace ImageResizer
{
#pragma warning disable CA1001 // Types that own disposable fields should be disposable
public partial class App : Application
#pragma warning restore CA1001 // Types that own disposable fields should be disposable
{
private ThemeManager _themeManager;
static App()
{
Console.InputEncoding = Encoding.Unicode;
@@ -28,6 +32,8 @@ namespace ImageResizer
var mainWindow = new MainWindow(new MainViewModel(batch, Settings.Default));
mainWindow.Show();
_themeManager = new ThemeManager(this);
// Temporary workaround for issue #1273
BecomeForegroundWindow(new System.Windows.Interop.WindowInteropHelper(mainWindow).Handle);
}