Rows within a row group often share a common intent, and may be styled as a group. The TableRowGroup element provides a way to arbitrarily group rows within a table every row in a table must belong to a row grouping. A Table element may be contained by any of the following elements: Table derives from the Block element, and adheres to the common rules for Block level elements. The following figure shows how this example renders. The following example defines a simple 2 x 3 table with XAML. Table is similar to the Grid element but has more capabilities and, therefore, requires greater resource overhead. Valid child elements for a TableCell include. TableCell may only contain elements that derive from Block. TableCell elements, which contain the actual content to be presented by the table, must be hosted in a TableRow element. TableRow elements must be hosted in a TableRowGroup element, which defines a grouping of rows for the table. TableColumn elements do not host content they simply define columns and characteristics of columns. Table provides a grid-based presentation consisting of columns (represented by TableColumn elements) and rows (represented by TableRow elements). Finally, a Grid requires less resources then a Table so consider using a Grid to improve performance. Child elements of a Grid can be absolutely positioned relative to the area of their "cell" boundaries. The Grid element allows layering of child content, allowing more than one element to exist within a single "cell." Table does not support layering. 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. Within a FlowDocument, Table supports flow content behaviors like pagination, column reflow, and content selection while a Grid does not. Grids are best used inside of forms (basically anywhere outside of flow content). A Table is designed for use within flow content (see Flow Document Overview for more information on flow content). Table and Grid share some common functionality, but each is best suited for different scenarios. This topic contains the following sections. The flexibility of this element makes it very useful, but also makes it more complicated to understand and use correctly. Table is a block level element that supports grid-based presentation of Flow document content.
0 Comments
Leave a Reply. |