File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ public MainWindow()
89
89
90
90
InitSoundEffects ( ) ;
91
91
DataObject . AddPastingHandler ( QueryTextBox , QueryTextBox_OnPaste ) ;
92
-
92
+ ModernWpf . ThemeManager . Current . ActualApplicationThemeChanged += ThemeManager_ActualApplicationThemeChanged ;
93
93
SystemEvents . PowerModeChanged += SystemEvents_PowerModeChanged ;
94
94
}
95
95
@@ -99,6 +99,11 @@ public MainWindow()
99
99
100
100
#pragma warning disable VSTHRD100 // Avoid async void methods
101
101
102
+ private void ThemeManager_ActualApplicationThemeChanged ( ModernWpf . ThemeManager sender , object args )
103
+ {
104
+ _theme . RefreshFrameAsync ( ) ;
105
+ }
106
+
102
107
private void OnSourceInitialized ( object sender , EventArgs e )
103
108
{
104
109
var handle = Win32Helper . GetWindowHandle ( this , true ) ;
@@ -1251,6 +1256,7 @@ protected virtual void Dispose(bool disposing)
1251
1256
_notifyIcon ? . Dispose ( ) ;
1252
1257
animationSoundWMP ? . Close ( ) ;
1253
1258
animationSoundWPF ? . Dispose ( ) ;
1259
+ ModernWpf . ThemeManager . Current . ActualApplicationThemeChanged -= ThemeManager_ActualApplicationThemeChanged ;
1254
1260
SystemEvents . PowerModeChanged -= SystemEvents_PowerModeChanged ;
1255
1261
}
1256
1262
You can’t perform that action at this time.
0 commit comments