ContentControl与ContentPresenter区别?
<TextBlock HorizontalAlignment="Left" Text="{Binding HwContent, Converter={StaticResource TextSerialize}}" VerticalAlignment="Top" Margin="76,26,160,0" TextTrimming="CharacterEllipsis" Grid.Column="0" Height="Auto" FontSize="14" LineHeight="24" Cursor="Hand" TextWrapping="NoWrap" Foreground="{DynamicResource Foreground_Gray_level2}">
<TextBlock.ToolTip >
<ContentControl Content="{Binding HwContent}" >
<ContentControl.ContentTemplate>
<DataTemplate>
<Border MaxWidth="600" MinHeight="16" MaxHeight="320" Padding="5,5,5,5">
<TextBlock TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Text="{Binding Mode=OneTime}"/>
</Border>
</DataTemplate>
</ContentControl.ContentTemplate>
</ContentControl>
</TextBlock.ToolTip>
</TextBlock>
ContentPresenter显示不出来,但是ContentControl 能显示出来
ContentControl与ContentPresenter区别?的更多相关文章
- ContentControl和ContentPresenter的应用
1:wpf中,所有的内容控件都继承自“ContentControl” ,所以我们可以直接应用“ContentControl”自定义我们“需要的”内容控件. 2:ContentControl具有Cont ...
- 重新想象 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 ...
随机推荐
- PC工作原理
提到"技术"这个词时,大多数人都会想到计算机.事实上,我们生活中的方方面面都离不开计算机部件.家里的电器设备有内置的微处理器,例如电视机.甚至汽车里也装有计算机.但是,提到计算机大 ...
- 深入理解springAOP
概念:AOP(Aspect-Oriented Programming)即面向切面编程.它是对传统的OOP(面向对象)编程的一种补充,在OOP中往往一个对象有什么行为我们就定义什么方法,对象与对象之间存 ...
- 面试题目——《CC150》线程与锁
package cc150.thread_lock; public class RunnableThreadExample implements Runnable{ public int count ...
- android权限大全
访问登记属性 android.permission.ACCESS_CHECKIN_PROPERTIES ,读取或写入登记check-in数据库属性表的权限 获取错略位置 android.permiss ...
- CSS3中的动画功能(一)
css3中的动画功能分为transitions功能和animations功能,这两种功能都可以通过改变css属性值来产生动画效果.今天带大家一起来看看css3动画功能中的transitions的用法. ...
- #define #include #undef的其中一个用法(目的)
一.背景 最近在跟一段系统级的代码,和原来单纯的下位机代码相比,真的是刘姥姥进大观园--看花了眼.相较于 之前所常见的各种下位机代码,系统级代码常常会出现深层次结构体嵌套,结构体内的各种回调函数导致对 ...
- CSS背景background详解,background-position详解
背景(background)是css中一个重要的的部分,也是需要知道的css的基础知识之一.这篇文章将会涉及css背景(background)的基本用法,包括诸如 background-attachm ...
- saltstack(主机改名)
已存在salt中的机器,为了规范,需要将这批主机改名 操作流程:在master把这批机器剔除:然修改这批机器的主机名.在/etc/salt目录下.用mv把minion_id和pki的目录重命名.重启s ...
- HMTL判断ie版本
html判断IE版本 1. <!--[if !IE]><!--> 除IE外都可识别 <!--<![endif]--> 2. <!--[if IE]> ...
- python嵌套函数、闭包与decorator
1 一段代码的执行结果不光取决与代码中的符号,更多地是取决于代码中符号的意义,而运行时的意义是由名字空间决定的.名字空间是在运行时由python虚拟机动态维护的,但是有时候我们希望能将名字空间静态化. ...