Changing The MahApps Metro Theme

后端 未结 1 646
挽巷
挽巷 2021-02-13 15:38

I know that the MahApps metro theme comes with \"themes\" (colour sets), but I don\'t know how to change them from the default settings in my WPF application.

I have fol

相关标签:
1条回答
  • 2021-02-13 16:18

    If you want to change the default colour scheme, just change which colour resource file is loaded.

    from Blue:

        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
    

    to Red:

        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Red.xaml" />
    

    You can also change programatically (once you've loaded every colour resource file) using ThemeManager.ChangeTheme().

    0 讨论(0)
提交回复
热议问题