WPF:按钮模板VS的ContentTemplate [英] WPF: Button Template vs ContentTemplate

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

问题描述

我可以说,通常情况下,在WPF中,属性模板包含的ContentTemplate ?否则,什么区别?

Can I say that usually, in WPF, properties Template contains ContentTemplate? Or else, whats the difference?

推荐答案

<一个href=\"http://msdn.microsoft.com/en-us/library/system.windows.controls.control.template.aspx\">Template定义了控制的外观。 <一href=\"http://msdn.microsoft.com/en-us/library/system.windows.controls.contentcontrol.contenttemplate.aspx\">ContentTemplate指定如何包含的内容/由<一个显示href=\"http://msdn.microsoft.com/en-us/library/system.windows.controls.contentcontrol.aspx\">ContentControl要被显示。

Template defines the appearance of the control. ContentTemplate specifies how the content contained in/displayed by a ContentControl is to be displayed.

下面是一个Social.MSDN <一个href=\"http://social.msdn.microsoft.com/Forums/en/wpf/thread/ba37a337-8d62-4343-9155-0a5093467649\">thread包含示出了两者之间的差别,例如,

Here's a Social.MSDN thread containing an example that shows the difference between the two.

希望这有助于结果

Hope this helps,
Ben

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

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