Silverlight4Beta之TextBox的文本修剪

简介:

介绍一个silverlight4beta中有关TextBox小小的新特性--TextTrimming属性

<TextBlock  
 Text="The quick brown fox jumps over the lazy dog"  
 TextTrimming="WordEllipsis" />

当文本超出可显示区域时,就会这样

image

会用省略号显示剩余部分…,很像CSS中的text-overflow:ellipsis哦













本文转自紫色永恒51CTO博客,原文链接: http://www.cnblogs.com/024hi/archive/2009/11/19/1606353.html,如需转载请自行联系原作者




相关文章
WPF中给TextBox/TextBlock设置提示文本
WPF中给TextBox/TextBlock设置提示文本
WPF中给TextBox/TextBlock设置提示文本
|
C#
WPF TextBox/TextBlock 文本超出显示时,文本靠右显示
原文:WPF TextBox/TextBlock 文本超出显示时,文本靠右显示 文本框显示 文本框正常显示: 文本框超出区域显示:    实现方案 判断文本框是否超出区域 请见《TextBlock IsTextTrimmed 判断文本是否超出》 设置文本布局显示 1.
1654 0
|
图形学
unity3d曲线text文本
测试.png using System; using System.Collections.Generic; namespace UnityEngine.UI.Extensions { /// /// Curved text.让文本按照曲线进行显示 【注意对Image的变形 也是可以的】 /// 说明: 对Text的操作就和 shadow 和 outline 组件类似。
1454 0
|
C#
【msdn wpf forum翻译】TextBox中文本 中对齐 的方法
原文:【msdn wpf forum翻译】TextBox中文本 中对齐 的方法原文链接:http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/49864e35-1dbf-4292-a361-93f1a8400558 问题:TextBox中文本中对齐,使用 TextBox.HorizontalContentAlignment="Center"行不通(TextBox.VerticalContentAlignment="Center"则会起到预期的作用。
1228 0
|
C#
如何将Skyline66嵌入WPF中
1.新建WPF项目; 2.添加引用 .net引用:System.Windows.Forms和WindowsFormsIntegration skyline引用:AxInterop.TerraExplorerX和TerraExplorerX 3.
1178 0
|
C#
WPF TextBlock IsTextTrimmed 判断文本是否超出
原文:WPF TextBlock IsTextTrimmed 判断文本是否超出 WPF TextBlock 设置TextTrimming情况下 判断 isTextTrimmed(Text 文本是否超出 是否出现了省略号)     private bool IsTextTrimmed(Te...
1263 0
|
Windows
背水一战 Windows 10 (70) - 控件(控件基类): UIElement - Transform3D(3D变换), Projection(3D投影)
原文:背水一战 Windows 10 (70) - 控件(控件基类): UIElement - Transform3D(3D变换), Projection(3D投影) [源码下载] 背水一战 Windows 10 (70) - 控件(控件基类): UIElement - Transform3D(3...
1157 0
|
Windows
背水一战 Windows 10 (71) - 控件(控件基类): UIElement - RenderTransform(2D变换), Clip(剪裁)
原文:背水一战 Windows 10 (71) - 控件(控件基类): UIElement - RenderTransform(2D变换), Clip(剪裁) [源码下载] 背水一战 Windows 10 (71) - 控件(控件基类): UIElement - RenderTransform(2...
1247 0