WPF-Layout
来源:互联网 发布:ghost linux 编辑:程序博客网 时间:2024/05/20 12:50
1.TextBlock最基本的文字控件
可以配置5个Font属性。
TextWraping属性,"Wrap"是换行,NoWrap是不换行。
TextBlock控件内可以放置很多控件,不光是文字。
<TextBlock TextWraping="Wrap">
<Button>Split</Button>
<CheckBox>across</CheckBox>
<TextBox>multiple</TextBox>
lines
</TextBlock>
AccessText,Bold,Hyperlink,Italic和Underline望文生义,Subscript和Superscript已经废弃。(AccessText没有期望的效果) 2. Text and Whitespace 这里Whitespace指的是 回车符,就是说,TextBlock是将其忽略的,只有在TextBlock中设置了xml:space="preserve" ,才会表现出来这个回车换行: 当然,一般不建议主动这么做,除非你是直接copy一大段文章过来。 你或者可以把xml:space="preserve"只设置在 <Bold>rather</Bold>上,也能达到同样的效果。 设置TextAlignment="Left"/Right/Center/Justify属性,可以控制TextBlock中文本对齐方式,Justify是居中对齐。 3.TextFlow 功能比TextBlock强大,提供了5个内嵌的容器标签: 1)Paragraph 2)List 3)Table 4)Floater 5)Figure 粗粗看了一遍这5个容器,没什么意思,无非是Word中的5种布局方案的迁移,而且,微软白皮书说,TextBlock的效率比TextFlow高很多,尽量必要用后者。 <TextBlock FontSize="18">
<AccessText>T</AccessText>his <Italic>is</Italic> <Bold>rather</Bold>
<Underline>messy</Underline>. <Hyperlink>www.example.com</Hyperlink>
</TextBlock> <TextBlock FontSize="18" xml:space="preserve">
<AccessText>T</AccessText>his <Italic>is</Italic> <Bold>rather</Bold>
<Underline>messy</Underline>. <Hyperlink>www.example.com</Hyperlink>
</TextBlock>
- WPF-Layout
- WPF中的 Layout To Layout
- WPF中的 Layout To Layout
- WPF的布局(Layout)
- wpf Layout布局 (转贴)
- WPF Layout Control
- WPF & Silverlight Layout Controls
- WPF Control Layout
- WPF初学者指南1-Layout
- WPF SDK研究 之 Layout布局
- WPF 入门 -- Layout:Grid, DockPanel and StackPanel
- WPF下的布局(Layout、Panel)小记
- WPF 入门 -- Layout:Grid, DockPanel and StackPanel
- WPF Layout 系统概述——Measure
- WPF Layout 系统概述——Arrange
- WPF入门(八)布局(layout)
- The process that WPF determine the layout of UIelements
- WPF中几个属性对Layout的影响
- window.open的用法---javascript学习笔记
- Java调用SQL Server的存储过程详解(二)
- 宁静的月
- 常用的C#基础帮助文档
- 软件工程师的十个“不职业”行为
- WPF-Layout
- 笔试题目
- wlan 扩展频谱(Spread Spectrum)技术 DSSS VS FHSS
- GET/POST
- 浏览器(或客户端)触发,后台运行php脚本
- WPF中对ListView排序
- ComboBox绑定DataTable
- 接着体验安装
- WPF中ListView绑定数据源后居中显示