WPF中Auto与*的区别
来源:互联网 发布:使用动态规划的算法 编辑:程序博客网 时间:2024/05/21 10:50
转自:http://blog.csdn.net/changtianshuiyue/article/details/25157303
Auto 表示自动适应显示内容的宽度,如自动适应文本的宽度,文本有多长,控件就显示多长.
* 则表示按比例来分配宽度.
<ColumnDefinitionWidth="3*"/>
<ColumnDefinitionWidth="7*"/>
同样,行可以这样定义
<RowDefinitionHeight="3*"/>
<RowDefinitionHeight="7*"/>
这些数字可以是小数.
如果数字缺省,则默认是1.
在这个例子中, 列2的宽度是列1的1.5倍.
<ColumnDefinitionWidth="1.5*"/>
<ColumnDefinition/>
Auto和*可以混合使用.在这个例子中,后两行的宽度在前两行分配完之后,按比例获取剩余的宽度.
<Grid.ColumnDefinitions>
<ColumnDefinitionWidth="Auto"/> <!-- Auto-fit to content, 'Hi' -->
<ColumnDefinitionWidth="50.5"/> <!-- Fixed width: 50.5 device units)-->
<ColumnDefinitionWidth="69*"/> <!-- Take 69% of remainder -->
<ColumnDefinitionWidth="31*"/> <!-- Take 31% ofremainder -->
</Grid.ColumnDefinitions>
<TextBlockText="Hi"Grid.Column="0"/>
- WPF中Auto与*的区别
- WPF中Auto与*的区别
- WPF中Auto与*的区别
- auto与 decltype 的区别
- Xaml 中height和width中的Auto与*的区别
- res与res-auto的区别
- res与res-auto的区别
- res与res-auto的区别
- res与res-auto的区别
- res与res-auto的区别
- res与res-auto的区别
- res与res-auto的区别
- res与res-auto的区别
- res与res-auto的区别
- res与res-auto的区别
- C++ auto与decltype的区别
- width:100%与width:auto的区别
- WPF中,Grid与Table的区别(英文)
- 使用struts2标签上传用户头像(一)
- STM32F103RBT6 定时器 Timer2 源程序
- ASP.NET MVC的ContentResult
- HTML5基础(一)——元素、属性、格式化、样式、链接、表格、列表、块、布局
- MINA 2.0.9: 用户定义的事件是如何触发的
- WPF中Auto与*的区别
- abap create dynamic structure and dynamic table
- Linux tc性能测试
- Android网络操作之Volley
- 深入研究java.lang.ThreadLocal类
- Java-----jar反编译修改重新打包
- JAVA Serializable 类中的Serial Version ID
- 【MFC】获取当前时间
- java环境配置、编译运行、规范