WPF中,Grid与Table的区别(英文)-转载

原文地址:http://blog.csdn.net/johnsuna/article/details/1742799

How is Grid Different from Table?
Table and Grid share some common functionality, but each is best suited for different scenarios.

Table 和 Grid 有一些共同的特性,但是每个最适用的场景不同。
(1)Grid derives from the Panel element, it defines a flexible grid area that consists of columns and rows.
Table derives from the Block element, and adheres to the common rules for containing a Block element. A Table element may be contained by any of the following elements: FlowDocument, TableCell, ListBoxItem, ListViewItem, Section, Floater, Figure.
Grid 衍生于面板元素, 它定义了可变的包括行和列的网格元素

Table 衍生于快元素,并且遵循于块状元素的一般规则.一个Table元素可能包括以下任何元素:流文件,表单元格,列表框元素,列表视图元素,域,
(2) A Table is designed for use within flow content. 
Grids are best used inside of forms (basically anywhere outside of flow content).

(3) Within a FlowDocument, Table supports flow content behaviors like pagination, column reflow, and content selection while a Grid does not. 

(4)A Grid on the other hand is best used outside of a FlowDocument for many reasons including Grid adds elements based on a row and column index, Table does not.

(5)The Grid element allows layering of child content, allowing more than one element to exist within a single "cell." 
Table does not support layering. 

(6)Child elements of a Grid can be absolutely positioned relative to the area of their "cell" boundaries. Table does not support this feature. 

(7)Finally, Grid also offers more flexible resizing behavior than Table. A Grid is lighter weight then a Table.

转载于:https://www.cnblogs.com/yesihoang/p/4531165.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值