在哪里可以找到本机 WPF 控件的 Generic.xaml? [英] Where to find Generic.xaml for native WPF controls?

查看:35
本文介绍了在哪里可以找到本机 WPF 控件的 Generic.xaml?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在哪里可以找到本机 WPF 控件(如按钮、复选框、文本框等)的 Generic.xaml(或其他具有默认外观的代码)?

Where to find Generic.xaml (or other code with the default look) for native WPF controls such as Button, CheckBox, TextBox, etc?

推荐答案

在 Silverlight(我知道您的问题是关于 WPF)中,此信息比在 WPF 中更易于访问.您可以从以下任何来源获取此信息:

In Silverlight (and I know that your question is about WPF) this information is more accessible than in WPF. You can get this information from any of these sources:

  1. 控件样式和模板 在 MSDN 上.

您可以查看相关 Silverlight 程序集的资源并提取嵌入资源中的 themes/generic.xaml.我使用反射器来做到这一点.

You can look at the resources of the relevant Silverlight assembly and extract the themes/generic.xaml embedded in a resource. I use Reflector to do this.

您可以使用工具提取特定控件的控件模板.我使用 Expression Blend 来做到这一点.这也适用于 WPF.

You can extract the control template of a specific control using a tool. I use Expression Blend to do this. This also works for WPF.

这篇关于在哪里可以找到本机 WPF 控件的 Generic.xaml?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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