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.
(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.

(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.

时间: 2024-10-08 22:03:46

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

WPF中ControlTemplate和DataTemplate的区别

下面代码很好的解释了它们之间的区别: <Window x:Class="WPFTestMe.Window12" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window12" Height="300&q

WPF中Grid布局

WPF中Grid布局XMAl与后台更改,最普通的登录界面为例. <Grid Width="200" Height="100" > <!--定义了两列--> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="100*"/> </Grid.Column

C++中struct与class的区别(转载)

很多初学者或者是想当然,或者是被网上的一些错误信息给误导,面试中问到class和struct区别时经常会说class可以继承而struct不可以继承,这是完全错误的.但在C#中,class与struct确实有这点区别(当然不止这一点).其实,在C++中,这两个关键词并没有大的区别,仅在细节上有些不同. 1. 字面上的区别 在字面上struct是structure的缩写,通常叫做“结构体”,在C语言里用于将多种数据.多个变量组织在一起,便于表达比较复杂的数据类型,在C++中为了兼容C语言保留了该关

WPF中Grid实现网格,表格样式通用类

/// <summary> /// 给Grid添加边框线 /// </summary> /// <param name="grid"></param> public static void InsertFrameForGrid(Grid grid) { var rowcon = grid.RowDefinitions.Count; var clcon = grid.ColumnDefinitions.Count; for (var i =

WPF中Grid实现网格,表格样式通用类(转)

/// <summary> /// 给Grid添加边框线 /// </summary> /// <param name="grid"></param> public static void InsertFrameForGrid(Grid grid) { var rowcon = grid.RowDefinitions.Count; var clcon = grid.ColumnDefinitions.Count; for (var i =

WPF中Grid绑定DataTable数据。

1.首先引用DocumentFormat.OpenXml.dll 2.然后新建一个OpenExcelHelper类,将Excel转化为Datatable. /// <summary>        /// 根据指定EXCEL流组织成DataTable        /// </summary>        /// <param name="sheetName">需要读取的SHEET</param>        /// <para

wpf 中Grid后面总是多一空白行

<Grid> <dxg:GridControl Name="gridErrorsInfo" AutoPopulateColumns="True" ShowBorder="False" ShowLoadingPanel="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" AllowColumn

MySQL 中NULL和空值的区别 (转载 http://blog.sina.com.cn/s/blog_3f2a82610102v4dn.html)

平时我们在使用MySQL的时候,对于MySQL中的NULL值和空值区别不能很好的理解.注意到NULL值是未知的,且占用空间,不走索引,DBA建议建表的时候最好设置字段是NOT NULL 来避免这种低效率的事情的发生. 问题 1: 首先,我们需要搞清楚 "空值" 和"NULL"的概念: 1:空值('')是不占用空间的 2: MySQL中的NULL其实是占用空间的.官方文档说明: “NULL columns require additional space in the

HTTP协议中PUT和POST使用区别 【转载】

有的观点认为,应该用 POST来创建一个资源,用PUT来更新一个资源:有的观点认为,应该用PUT来创建一个资源,用POST来更新一个资源:还有的观点认为可以用PUT和 POST中任何一个来做创建或者更新一个资源.这些观点都只看到了风格,争论起来也只是争论哪种风格更好,其实,用PUT还是POST,不是看这是创建还 是更新资源的动作,这不是风格的问题,而是语义的问题. 在HTTP中,PUT被定义为idempotent的方法,POST则不是,这是一个很重要的区别. “Methods can also