ContentControl和ContentPresenter的应用
1:wpf中,所有的内容控件都继承自“ContentControl” ,所以我们可以直接应用“ContentControl”自定义我们“需要的”内容控件。
2:ContentControl具有Content属性,其派生的子控件可继承拥有它。ContentControl的“组成树”包括ContentPresenter元素,该元素具有“Content”属性,实际上是由ContentPresenter负责将ContentControl的Content属性显示出来,进一步,就是把“wpf内容控件”的Content属性显示出来。
在ContentControl的“组成树”内部:
ContentPresenter(它就有显示内容的功能,并且它是内容控件的内部组成“子元素”之一) :它才是真正显示内容的,它显示的内容对外部展示出来,我们看到控件的“内容”。所以有的时候,我们也可以直接应用“ContentPresenter”来自定义我们“需要的”内容控件。
ContentControl和ContentPresenter的应用的更多相关文章
- ContentControl与ContentPresenter区别?
<TextBlock HorizontalAlignment="Left" Text="{Binding HwContent, Converter={StaticR ...
- 重新想象 Windows 8 Store Apps (3) - 控件之内容控件: ToolTip, Frame, AppBar, ContentControl, ContentPresenter; 容器控件: Border, Viewbox, Popup
原文:重新想象 Windows 8 Store Apps (3) - 控件之内容控件: ToolTip, Frame, AppBar, ContentControl, ContentPresenter ...
- [UWP]为什么ContentControl的ControlTemplate里放两个ContentPresenter会出问题(绕口)
1. 简单的HeaderedContentControl 上周五收到反馈,在一个ContentControl的ControlTemplate中放两个ContentPresenter会出错.出错的例子是 ...
- [UWP]为什么ContentControl的ContentTemplate里放两个ContentPresenter会出问题(绕口)
原文:[UWP]为什么ContentControl的ContentTemplate里放两个ContentPresenter会出问题(绕口) 1. 简单的HeaderedContentControl 上 ...
- WPF的Presenter(ContentPresenter)(转)
这是2年前写了一篇文章 http://www.cnblogs.com/Clingingboy/archive/2008/07/03/wpfcustomcontrolpart-1.html 我们先来看M ...
- ContentPresenter
这是2年前写了一篇文章 http://www.cnblogs.com/Clingingboy/archive/2008/07/03/wpfcustomcontrolpart-1.html 我们先来看M ...
- WPF的Presenter(ContentPresenter)
WPF的Presenter(ContentPresenter) 2010-12-20 14:34 by Clingingboy, 10619 阅读, 3 评论, 收藏, 编辑 这是2年前写了一篇文章 ...
- ContentPresenter理解
这是2年前写了一篇文章 http://www.cnblogs.com/Clingingboy/archive/2008/07/03/wpfcustomcontrolpart-1.html 我们先来看M ...
- [转]WPF的Presenter(ContentPresenter)
这是2年前写了一篇文章 http://www.cnblogs.com/Clingingboy/archive/2008/07/03/wpfcustomcontrolpart-1.html 我们先来看M ...
随机推荐
- django+celery 实现定时任务
利用 celery 实现定时任务 celery支持定时任务,设定好任务的执行时间,celery就会定时自动帮你执行, 这个定时任务模块叫celery beat Celery安装 由于celery 4. ...
- GlusterFS部署
一.GlusterFS简介 PB级容量.高可用.读写性能.基于文件系统级别共享.分布式.无metadata(元数据)的存储方式. GlusterFS(GNU ClusterFile System)是一 ...
- Linux系统——文件和目录权限
文件及目录权限(七进制表示) r 读权限(4),允许查看文件内容 w 写权限(2),允许修改文件内容 x 可执行权限(1),允许运行程序 - 无权限(0) 属主:拥有该文件的用户账号 属组:拥有该 ...
- ruby中的instance_eval,class_eval,eval
ruby具有在运行时执行以字符串形式保存的代码的功能设施,eval族方法 .包括Kernel#eval,Object#instance_eval,Module#class_eval. Kernel#e ...
- Git-基本操作(同SVN)
本人拜读了廖雪峰老师关于Git的讲述后整理所得 1.创建版本库: 版本库又名仓库,英文名repository,你可以简单理解成一个目录,这个目录里面的所有文件都可以被Git管理起来,每个文件的修改.删 ...
- C++ char float int string 之间的转换
string str = "123"; string 转 int int i = atoi( str.c_str() ); string 转 float float f = ato ...
- 简单地理解HTTPS 转
原文地址:http://www.nowamagic.net/librarys/veda/detail/2394 我们都知道HTTPS能够加密信息,以免敏感信息被第三方获取.所以很多银行网站或电子邮箱等 ...
- 防止常见XSS 过滤 SQL注入 JAVA过滤器filter
XSS : 跨站脚本攻击(Cross Site Scripting),为不和层叠样式表(Cascading Style Sheets, CSS)的缩写混淆,故将跨站脚本攻击缩写为XSS.恶意攻击者往W ...
- eclipse中Web Deployment Assembly与build path作用
java Build path是编译路径设置,主要用来设置源代码的编译路径默认是default output folder Web Deployment Assembly是eclipse中的发布路径设 ...
- 前端工程师在实现支付功能的时候能做些什么(V客学院技术分享)?
现在最流行的两种支付微信支付和支付宝支付,在日常开发的过程中肯定离不开支付功能的开发,有很多人第一次接触时会有些措手不及. 一.业务逻辑 (电商平台为例子) 支付大部分用在电商平台,各种打赏,游戏充值 ...