如何获取 WPF 4.0 控件默认模板? [英] How to grab WPF 4.0 control default templates?

查看:30
本文介绍了如何获取 WPF 4.0 控件默认模板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用 Expression Blend 来复制 WPF 4.0 控件的默认模板.我正在写一篇关于扩展 WPF 控件的 CodeProject 文章,我想推荐一个免费工具作为替代.你有什么建议?感谢您的帮助.

I have been using Expression Blend to copy the default templates for WPF 4.0 controls. I am writing a CodeProject article on extending WPF controls, and I would like to recommend a free tool as an alternative. What would you suggest? Thanks for your help.

推荐答案

在以前版本的 WPF 中,样式可在此 MSDN 链接.您可以尝试更改为旧版本,以查看下载链接.不幸的是,这尚未针对 .NET 4.0 进行更新.

In previous versions of WPF the styles were available at this MSDN link. You can try changing to Older versions, to see the download links. Unfortunately, this hasn't been updated for .NET 4.0 yet.

在此之前,如果您可以使用带有 BamlViewer 插件.安装后,您将使用 Open Cache 打开这些程序集之一:

Until that happens, if ever you can use Reflector with the BamlViewer plugin. Once you have that installed, you'd open one of these assemblies using Open Cache:

  1. PresentationFramework.Aero
  2. PresentationFramework.Classic
  3. PresentationFramework.Luna
  4. PresentationFramework.Royale

确保选择 4.0.0.0 版本.然后展开程序集和关联的资源节点.选择资源条目并按空格键查看反汇编程序.然后您可以看到 BAML 文件,您可以使用 BamlViewer 查看 XAML.唯一的缺点是您丢失了原始格式.

Make sure to select the 4.0.0.0 versions. Then expand the assembly and associated Resources nodes. Selected the resource entry and press the Space bar to view the Disassembler. Then you can see the BAML files, which you can view the XAML using BamlViewer. The only downside is you lose the original formatting.

.NET 4 样式可以从此处下载.更具体地说,第二段中的默认 WPF 主题 链接.或者,您可以深入查看特定控件以查看样式示例.

The .NET 4 Styles can be downloaded from here. More specifically, the Default WPF Themes link in the second paragraph. Alternatively, you can drill into specific controls to see a Style example.

这篇关于如何获取 WPF 4.0 控件默认模板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆