Files
docs-desktop/dotnet-desktop-guide/framework/wpf/advanced/how-to-define-a-table-with-xaml.md
T
Andy (Steve) De George be103da07e Replace various WPF include files with content (#1335)
* net-current-v30plus-md.md

* net-current-v40plus-md.md

* tla2sharptla-ui-md.md

* tla2sharptla-uiautomation-md.md

* tla2sharptla-winclient-md.md

* tla2sharptla-xaml-md.md

* tlasharptla-ui-md.md

* tlasharptla-uiautomation-md.md

* tlasharptla-winclient-md.md

* tlasharptla-xaml-md.md

* fix warnings
2022-03-16 12:14:11 -04:00

1.5 KiB

title, ms.date, helpviewer_keywords, ms.assetid
title ms.date helpviewer_keywords ms.assetid
How to: Define a Table with XAML 03/30/2017
XAML [WPF], defining tables
documents [WPF], defining tables with XAML
tables [WPF], defining with XAML
83f2dc58-437e-4cdc-b5dd-0019810c7a85

How to: Define a Table with XAML

The following example demonstrates how to define a xref:System.Windows.Documents.Table using Extensible Application Markup Language (XAML). The example table has four columns (represented by xref:System.Windows.Documents.TableColumn elements) and several rows (represented by xref:System.Windows.Documents.TableRow elements) containing data as well as title, header, and footer information. Rows must be contained in a xref:System.Windows.Documents.TableRowGroup element. Each row in the table is comprised of one or more cells (represented by xref:System.Windows.Documents.TableCell elements). Content in a table cell must be contained in a xref:System.Windows.Documents.Block element; in this case xref:System.Windows.Documents.Paragraph elements are used. The table also hosts a hyperlink (represented by the xref:System.Windows.Documents.Hyperlink element) in the footer row.

Example

[!code-xamlTableSnippetsXAML#_TableXAML]

The following figure shows how the table defined in this example renders:

Screenshot of a table defined with XAML.