daixinet

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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

 

posted on 2012-05-28 14:25  daixinet.com  阅读(702)  评论(0编辑  收藏  举报