WPF 切换主题

            string packUri = String.Format(@"/WpfControlLibrary1;component/Dictionary1.xaml");
            ResourceDictionary rd = Application.LoadComponent(new Uri(packUri, UriKind.Relative)) as ResourceDictionary;
            this.Resources.MergedDictionaries.Clear();
            this.Resources.MergedDictionaries.Add(rd);
//Application.Current.Resources.MergedDictionaries.Clear();
            //Application.Current.Resources.MergedDictionaries.Add(rd);

1、一个主题

 <ResourceDictionary Source="/PresentationFramework.Royale;V3.0.0.0;31bf3856ad364e35;component\themes\royale.normalcolor.xaml" />


参考:

http://download.csdn.net/detail/leogle_reloaded/3683771

 

相关文章:

  • 2022-12-23
  • 2021-06-17
  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
  • 2022-12-23
  • 2021-07-11
  • 2021-07-22
相关资源
相似解决方案