2012-01-23 40 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

相關問題