-api-id | -api-type |
---|---|
P:Microsoft.UI.Xaml.Controls.TreeView.ItemTemplate |
winrt property |
Gets or sets the DataTemplate used to display each item.
The template that specifies the visualization of the data objects. The default is null.
<TreeView>
<TreeView.ItemTemplate>
singleDataTemplate
</TreeView.ItemTemplate>
</TreeView>
<TreeView ItemTemplate="resourceReferenceToDataTemplate"/>
- singleDataTemplate
- singleDataTemplateA single DataTemplate object element. That DataTemplate would typically have multiple child elements that define the visual appearance of the data representation.
- resourceReferenceToDataTemplate
- resourceReferenceToDataTemplateA resource reference to an existing DataTemplate from a resources collection. The resource reference must specify the desired DataTemplate by key through a {StaticResource} markup extension usage.