Skip to content

Commit

Permalink
Added support for active windows color
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyNefyodov committed Dec 13, 2023
1 parent 5317353 commit 0cf598a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions RevitLookup/Views/RevitLookupView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
using CommunityToolkit.Mvvm.Input;
using RevitLookup.Services.Contracts;
using Wpf.Ui;
using Wpf.Ui.Appearance;
using Wpf.Ui.Win32;

namespace RevitLookup.Views;

Expand Down Expand Up @@ -104,6 +106,11 @@ protected override void OnActivated(EventArgs args)
{
base.OnActivated(args);
Wpf.Ui.Application.MainWindow = this;
ApplicationThemeManager.ApplySystemTheme();
if (Utilities.IsOSWindows11OrNewer)
{
ApplicationThemeManager.Apply(_settingsService.Theme, _settingsService.Background);
}
}

protected override void OnClosed(EventArgs args)
Expand Down

0 comments on commit 0cf598a

Please sign in to comment.