2012-01-23 42 views
3

我在我的WPF应用程序中使用Expression Dark Theme如何将主题应用于扩展WPF工具包?

另外我必须使用Extended WPF Toolkit Controls

如何将这个主题应用于他们?

enter image description here

XAML:

<Application x:Uid="Application_1" x:Class="Mega.App" 
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
      StartupUri="MainWindow.xaml" 
      SessionEnding="App_SessionEnding" > 
    <Application.Resources> 
     <ResourceDictionary x:Uid="ResourceDictionary_1" > 
      <ResourceDictionary.MergedDictionaries> 
       <ResourceDictionary x:Uid="ResourceDictionary_3" Source="/Themes/ExpressionDark.xaml" /> 
      </ResourceDictionary.MergedDictionaries> 
     </ResourceDictionary> 
    </Application.Resources> 
</Application> 

回答

2

您应该创建自己的风格从扩展工具包每个自定义控制,因为标准的主题都支持控制从.NET框架类似按钮的textBox等等,看看主题的xaml代码并以相同的方式创建您的样式。

+1

现在有更好的方法来做到这一点吗? 4年后... – NielW

相关问题