简体   繁体   中英

How to apply the theme to Extended WPF Toolkit?

I use the Expression Dark Theme in my WPF application.

Also I have to use Extended WPF Toolkit Controls .

How I can apply this theme to them?

在此输入图像描述

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>

您应该从扩展工具包为每个自定义控件创建自己的样式,因为标准主题支持.NET Framework中的控件,如按钮textBox等,查看主题的xaml代码并以相同的方式创建您的样式。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM