Delen via


TreeView.ItemContainerStyleSelector Property

Definition

Gets or sets a reference to a custom StyleSelector logic class. The StyleSelector returns different Style values to use for the item container based on characteristics of the object being displayed.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeView.ItemContainerStyleSelector (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

StyleSelector ItemContainerStyleSelector();

void ItemContainerStyleSelector(StyleSelector value);
public StyleSelector ItemContainerStyleSelector { get; set; }
var styleSelector = treeView.itemContainerStyleSelector;
treeView.itemContainerStyleSelector = styleSelector;
Public Property ItemContainerStyleSelector As StyleSelector
<TreeView ItemContainerStyleSelector="styleSelectorReference" />

Property Value

A custom StyleSelector logic class.

Windows requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)

Applies to