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
762 stars 122 forks source link

Stepper doesn't work in colorzone or in Dialogs(MaterialDesignDialogHost) #36

Closed speedyalibaba closed 5 years ago

speedyalibaba commented 5 years ago

Unfortunatly the stepper foreground and when hovering the hover-color are not corectly set when the stepper is inside a colorzone from MaterialDesignInXamlToolkit: image

Something simmilar happens when the stepper is inside a materialDesign-Dialog and the App is set to dark (the dialog is always in light mode): image

It seems that the stepper is somehow always using the application colors.

spiegelp commented 5 years ago

@speedyalibaba There is a quite easy trick for your special requirements: Reference the theme with the desired colors inside your Stepper control.

<controls:Stepper>
    <controls:Stepper.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignExtensions;component/Themes/MaterialDesignDarkTheme.xaml" />
                 <!-- or -->
                 <!--<ResourceDictionary Source="pack://application:,,,/MaterialDesignExtensions;component/Themes/MaterialDesignDarkTheme.xaml" />-->
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </controls:Stepper.Resources>
</controls:Stepper>
speedyalibaba commented 5 years ago

@spiegelp Thank you very much. Helped me a lot :)