2013-04-03 14 views
0

我想将ComponentOne主题应用于我的Silverlight应用程序;但是,我无法正常工作。任何人都知道我错过了什么?将silverlight应用于整个应用程序

我想添加它App.xaml.cs下application_startup:

Current.Resources.MergedDictionaries.Add(new C1ThemeWhistlerBlue()); 

回答

0

我最终找出另一种方式来做到这一点。将以下行添加到app.xaml.cs中的Application_startup:

new C1ThemeWhistlerBlue().Apply((FrameworkElement)Current.RootVisual); 

这将添加主题Whistler Blue。

要删除主题,您需要清除Current.Resources.MergedDictionaries(或者只是从中删除该对象)。

相关问题