spiegelp / MaterialDesignExtensions

Material Design Extensions is based on Material Design in XAML Toolkit to provide additional controls and features for WPF apps
https://spiegelp.github.io/MaterialDesignExtensions/
MIT License
754 stars 122 forks source link

Unable to change OpenFileDialog colors #40

Closed Gigas002 closed 5 years ago

Gigas002 commented 5 years ago

I'm using 2.6.0 version from NuGet. I have the following color scheme in my App.xaml:

<!-- Material Design Extensions -->
<ResourceDictionary Source="pack://application:,,,/MaterialDesignExtensions;component/Themes/Generic.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignExtensions;component/Themes/MaterialDesignDarkTheme.xaml" />
<!--  Material Design  -->
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Dark.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Cyan.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Teal.xaml" />

The application looks as it should: image

But the dialogs are light colored: image

The same behavior is for OpenDirectoryDialog and SaveFileDialog.

Is there any way to use the same color scheme for them, as the application uses?

spiegelp commented 5 years ago

@Gigas002 The DialogHost of Material Design in XAML uses its own theme. You need to set the theme on your instance.

<md:DialogHost Identifier="dialogHost" DialogTheme="Dark">
...
</md:DialogHost>
Gigas002 commented 5 years ago

Thanks, that worked out.