File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
src/dosymep.Xpf.Core/SimpleServices/DxCustomServices/DXCustomDialogs Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,14 @@ protected override IDialogHost CreateDialogHost(IntPtr hwndOwner) {
2424 ShowInTaskbar = false
2525 } ;
2626
27- _themeUpdaterService ( ) . SetTheme ( _theme ( ) . HostTheme , fileDialogWindow ) ;
27+ IUIThemeService themeService = _theme ( ) ;
28+ IUIThemeUpdaterService themeUpdaterService = _themeUpdaterService ( ) ;
29+
30+ if ( themeService is null || themeUpdaterService is null ) {
31+ ThemeManager . SetTheme ( fileDialogWindow , Theme . Win10Light ) ;
32+ } else {
33+ themeUpdaterService . SetTheme ( themeService . HostTheme , fileDialogWindow ) ;
34+ }
2835
2936 return fileDialogWindow ;
3037 }
Original file line number Diff line number Diff line change @@ -23,9 +23,16 @@ protected override IDialogHost CreateDialogHost(IntPtr hwndOwner) {
2323 WindowStyle = WindowStyle . ToolWindow ,
2424 ShowInTaskbar = false
2525 } ;
26+
27+ IUIThemeService themeService = _theme ( ) ;
28+ IUIThemeUpdaterService themeUpdaterService = _themeUpdaterService ( ) ;
2629
27- _themeUpdaterService ( ) . SetTheme ( _theme ( ) . HostTheme , fileDialogWindow ) ;
28-
30+ if ( themeService is null || themeUpdaterService is null ) {
31+ ThemeManager . SetTheme ( fileDialogWindow , Theme . Win10Light ) ;
32+ } else {
33+ themeUpdaterService . SetTheme ( themeService . HostTheme , fileDialogWindow ) ;
34+ }
35+
2936 return fileDialogWindow ;
3037 }
3138 }
You can’t perform that action at this time.
0 commit comments