WPF:主题及其使用方式

本文关键字:方式 WPF | 更新日期: 2023-09-27 18:37:07

我刚刚购买了WPF的Telerik UI组件,安装后它在Visual Studio(2013)中创建了一个独特的Telerik C# WPF项目类型。选择该项目模板后,会弹出一个向导,完成后,我看到一个Themes文件夹添加到我的项目中,其中有许多.xaml文件,例如System.Window.xaml

我知道这些文件可能是可重用的主题,可以设置我的窗口样式,但问题是这是我第一次遇到这样的文件。所以我有两个问题:

1-这些文件到底是什么?

2-如果它们是可重复使用的样式,我如何使用它们。喜欢,但将整个样式添加到空窗口中。

例如,如果我使用 Office 主题,我的应用程序是否会自动看起来像 MS Office?

WPF:主题及其使用方式

请阅读Telerik的这些文档:

http://docs.telerik.com/devtools/wpf/styling-and-appearance/styling-apperance-implicit-styles-overview.html
http://docs.telerik.com/devtools/wpf/styling-and-appearance/styling-apperance-themes-runtime.htmlhttp://docs.telerik.com/devtools/wpf/styling-and-appearance/stylemanager/common-styling-apperance-setting-theme-wpf.html