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()
8989
9090            InitSoundEffects ( ) ; 
9191            DataObject . AddPastingHandler ( QueryTextBox ,  QueryTextBox_OnPaste ) ; 
92- 
92+              ModernWpf . ThemeManager . Current . ActualApplicationThemeChanged   +=   ThemeManager_ActualApplicationThemeChanged ; 
9393            SystemEvents . PowerModeChanged  +=  SystemEvents_PowerModeChanged ; 
9494        } 
9595
@@ -99,6 +99,11 @@ public MainWindow()
9999
100100#pragma warning disable VSTHRD100  // Avoid async void methods 
101101
102+         private  void  ThemeManager_ActualApplicationThemeChanged ( ModernWpf . ThemeManager  sender ,  object  args ) 
103+         { 
104+             _theme . RefreshFrameAsync ( ) ; 
105+         } 
106+ 
102107        private  void  OnSourceInitialized ( object  sender ,  EventArgs  e ) 
103108        { 
104109            var  handle  =  Win32Helper . GetWindowHandle ( this ,  true ) ; 
@@ -1251,6 +1256,7 @@ protected virtual void Dispose(bool disposing)
12511256                    _notifyIcon ? . Dispose ( ) ; 
12521257                    animationSoundWMP ? . Close ( ) ; 
12531258                    animationSoundWPF ? . Dispose ( ) ; 
1259+                     ModernWpf . ThemeManager . Current . ActualApplicationThemeChanged  -=  ThemeManager_ActualApplicationThemeChanged ; 
12541260                    SystemEvents . PowerModeChanged  -=  SystemEvents_PowerModeChanged ; 
12551261                } 
12561262
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments