转储WPF模板 [英] Dumping WPF templates

查看:55
本文介绍了转储WPF模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我正在做一个自定义的ComboBox,需要访问默认的ComboBox模板.

我首先从已经渲染的ComboBox实例的template属性中转储Xml.后来我发现,如果我查看混合模板,它们看起来有些不同,不包括格式和类似内容.

从控件的Template属性中拉出的模板似乎只是我在Blend中看到的一个子集?

这有意义吗?


问候

Bernhard Richter

Hi!

I''m doing a custom ComboBox and need access to the default ComboBox template.

I started out by dumping the Xml from the template property of an already rendered ComboBox instance. Later I discovered that if I looked at the template in blend they look somewhat different, not counting formatting and stuff like that.

It seems like the template pulled from the control''s Template property is somewhat of a subset of what I see in Blend?

Does this make any sense?


Regards

Bernhard Richter

推荐答案

如果您有权使用Blend,则获取任何控件模板的最简单方法是在对象和时间轴"窗口中右键单击相关控件,选择编辑模板",然后选择编辑副本".这将为您提供控件的完整标准模板,您可以根据需要进行编辑.
If you have access to Blend, the easiest way to get a template for any control, is to right click the relevant control in Objects and Timeline window, select Edit Template, then select Edit a Copy. This will give you a full on standard template for the control, which you can edit as you like.


这篇关于转储WPF模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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