惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
D
Docker
有赞技术团队
有赞技术团队
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
爱范儿
爱范儿
H
Help Net Security
美团技术团队
MyScale Blog
MyScale Blog
B
Blog RSS Feed
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans
小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
G
Google Developers Blog
月光博客
月光博客
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs

博客园 - 源码工作室

什么是公司战略 开通了知识星球圈“程序猿团队管理之道” 我们的双12活动总结 做电商的切身经验分享 Android编译报Errors running builder 'Android Pre Compiler' on project 'XXX' java.lang.NullPointerException 技术不如你,但老板就是赏识他,为什么? 看我是如何快速学习android开发的(一) 屌丝创业,你能闯过这么多关吗? android不能显示log的问题 第一次和风投接触 你体会过创业的艰辛吗? 多个WPF工程公用ResourceDictionary文件 Bambook大赛程序结果发布兼拉票 Bambook大赛程序终于发布了 C# 如何检查当前用户在Windows系统下的权限 删除USB转串口的所有驱动 《家庭财务总管》升级(1.0.0.3) MFC中Wizard中看不到类的解决办法 总结C++中的所有强制转换函数(const_cast,reinterpret_cast,static_cast,dynamic_cast)(转载)
WPF中template的区别
源码工作室 · 2008-12-04 · via 博客园 - 源码工作室

As you can tell from the above figure, there are 4 kinds of Templates available within WPF.

1. ControlTemplate - You use this, when you want to completely redefine the visual appearance of any control. Say, you don't want a radiobutton to look like a radiobutton - you want it to look like a smiley instead. Smiling means Checked, and Frowning means Unchecked. You could easily acheive this using ControlTemplate.

2. ItemsPanelTemplate - Is a rather simple kind of template, it lets you control the appearance of the "ItemsPanel" property defined by "ItemsControl" on elements such as ListBox or ComboBox.

3. DataTemplate - is probably the most common kind of template you will use. It lets you change how "Content" is rendered on any control. So if you have an object called "Customer" and you want to define a standard look and feel for "Customer" - you'd use DataTemplate.

3.a. HierarchicalDataTemplate - is a class that is a DataTemplate that is very well suited to hierarchical data.