Schema Explorer
Important note about accessibility: In version 1.3 of the schema we introduced a label property on Inputs to improve accessibility. If the Host app you are targeting supports v1.3 you should use label instead of a TextBlock as seen in some samples below. Once most Host apps have updated to the latest version we will update the samples accordingly.
Table
Provides a way to display data in a tabular form.
Introduced in version 1.5
| Property | Type | Required | Description | Version |
|---|---|---|---|---|
| type | "Table" |
Yes | Must be "Table". |
1.5 |
| columns | TableColumnDefinition[] |
No | Defines the number of columns in the table, their sizes, and more. | 1.5 |
| rows | TableRow[] |
No | Defines the rows of the table. | 1.5 |
| firstRowAsHeader | boolean |
No, default: true |
Specifies whether the first row of the table should be treated as a header row, and be announced as such by accessibility software. | 1.5 |
| showGridLines | boolean |
No, default: true |
Specifies whether grid lines should be displayed. | 1.5 |
| gridStyle | ContainerStyle? |
No, default: "default" |
Defines the style of the grid. This property currently only controls the grid’s color. | 1.5 |
| horizontalCellContentAlignment | HorizontalAlignment? |
No | Controls how the content of all cells is horizontally aligned by default. When not specified, horizontal alignment is defined on a per-cell basis. | 1.5 |
| verticalCellContentAlignment | VerticalAlignment? |
No | Controls how the content of all cells is vertically aligned by default. When not specified, vertical alignment is defined on a per-cell basis. | 1.5 |
Inherited properties
| Property | Type | Required | Description | Version |
|---|---|---|---|---|
| fallback | Element, FallbackOption |
No | Describes what to do when an unknown element is encountered or the requires of this or any children can’t be met. | 1.2 |
| height | BlockElementHeight |
No | Specifies the height of the element. | 1.1 |
| separator | boolean |
No | When true, draw a separating line at the top of the element. |
1.5 |
| spacing | Spacing |
No | Controls the amount of spacing between this element and the preceding element. | 1.5 |
| id | string |
No | A unique identifier associated with the item. | 1.5 |
| isVisible | boolean |
No, default: true |
If false, this item will be removed from the visual tree. |
1.2 |
| requires | Dictionary<string> |
No | A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered. | 1.2 |
Example
Properties
columns
Defines the number of columns in the table, their sizes, and more.
- Type:
TableColumnDefinition[] - Required: No
- Allowed values:
TableColumnDefinition
rows
Defines the rows of the table.
- Type:
TableRow[] - Required: No
- Allowed values:
TableRow
firstRowAsHeader
Specifies whether the first row of the table should be treated as a header row, and be announced as such by accessibility software.
- Type:
boolean - Required: No, default:
true
showGridLines
Specifies whether grid lines should be displayed.
- Type:
boolean - Required: No, default:
true
gridStyle
Defines the style of the grid. This property currently only controls the grid's color.
- Type:
ContainerStyle? - Required: No, default:
"default" - Allowed values:
"default""emphasis""good": Added in version 1.2."attention": Added in version 1.2."warning": Added in version 1.2."accent": Added in version 1.2.
horizontalCellContentAlignment
Controls how the content of all cells is horizontally aligned by default. When not specified, horizontal alignment is defined on a per-cell basis.
- Type:
HorizontalAlignment? - Required: No
- Allowed values:
"left""center""right"
verticalCellContentAlignment
Controls how the content of all cells is vertically aligned by default. When not specified, vertical alignment is defined on a per-cell basis.
- Type:
VerticalAlignment? - Required: No
- Allowed values:
"top""center""bottom"
fallback
Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.
- Type:
Element,FallbackOption - Version : 1.2
- Required: No
- Allowed values:
ActionSetColumnSetContainerFactSetImageImageSetInput.ChoiceSetInput.DateInput.NumberInput.TextInput.TimeInput.ToggleMediaRichTextBlockTableTextBlock"drop": Causes this element to be dropped immediately when unknown elements are encountered. The unknown element doesn't bubble up any higher.
height
Specifies the height of the element.
- Type:
BlockElementHeight - Version : 1.1
- Required: No
- Allowed values:
"auto": The height of the container will be determined by the height of its contents."stretch": The container will stretch its height to the available remaining height of the parent container.
separator
When true, draw a separating line at the top of the element.
- Type:
boolean - Required: No
spacing
Controls the amount of spacing between this element and the preceding element.
- Type:
Spacing - Required: No
- Allowed values:
"default""none""small""medium""large""extraLarge""padding"
id
A unique identifier associated with the item.
- Type:
string - Required: No
isVisible
If false, this item will be removed from the visual tree.
- Type:
boolean - Version : 1.2
- Required: No, default:
true
requires
A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered.
- Type:
Dictionary<string> - Version : 1.2
- Required: No