博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
WPF控件模板和数据模板
阅读量:7111 次
发布时间:2019-06-28

本文共 669 字,大约阅读时间需要 2 分钟。

来自:http://www.th7.cn/Program/WPF/2011/12/21/51676.shtml    ControlTemplate用于描述控件本身. 使用TemplateBinding来绑定控件自身的属性, 比如{TemplateBinding Background}  DataTemplate用于描述控件的Content. 使用Binding来绑定数据对象的属性, 比如{Binding PersonName}  一般来说, ControlTemplate内有一个ContentPresenter, 这个ContentPresenter的ContentTemplate就是DataTemplate类型  Control类型  - Template属性 (ControlTemplate类型)  - ContentPresenter  - ContentTemplate (DataTemplate类型)  ContentControl类型  - Template属性 (ControlTemplate类型) 继承自Control  - ContentTemplate (DataTemplate类型)  ItemsControl类型  - Template属性 (ControlTemplate类型) 继承自Control  - ItemsPanel属性 (ItemsPanelTemplate类型) 指定布局容器  - ItemTemplate属性 (DateTemplate类型) 每个Item的Template

 

转载地址:http://ifghl.baihongyu.com/

你可能感兴趣的文章
一个有趣的python排序模块:bisect
查看>>
IOS Tutorial -- 1) Objective-C Basics
查看>>
理解.NET程序集的执行过程
查看>>
工作经验总结
查看>>
Oracle 触发器 插入,更新,删除,数据同步,两表同步
查看>>
学习从模仿开始 —— 模仿UI 导航帖
查看>>
C#接口-接口作为参数
查看>>
MBR
查看>>
使用数据视图
查看>>
坚持的力量 第二十篇
查看>>
Understanding Linux /proc/cpuinfo
查看>>
mybatis springmvc调用oracle存储过程,返回记录集
查看>>
openSession()和getCureentSession()的区别
查看>>
kvm 克隆虚拟机
查看>>
(转) OpenCV学习笔记大集锦 与 图像视觉博客资源2之MIT斯坦福CMU
查看>>
Controller 接口控制器详解
查看>>
【转】【MySQL】mysql 通过bin-log恢复数据方法详解
查看>>
linux上安装启动elasticsearch-5.5.1完整步骤
查看>>
请求失败或服务未及时响应。有关详细信息,请参见事件日志或其他适用的错误日志...
查看>>
Silverlight 4 MVVM开发方式(一)小黑端
查看>>