Udostępnij za pośrednictwem


TreeView.ItemContainerStyle Property

Definition

Gets or sets the style that is used when rendering the item containers.

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

public:
 property Style ^ ItemContainerStyle { Style ^ get(); void set(Style ^ value); };
Style ItemContainerStyle();

void ItemContainerStyle(Style value);
public Style ItemContainerStyle { get; set; }
var style = treeView.itemContainerStyle;
treeView.itemContainerStyle = style;
Public Property ItemContainerStyle As Style
<TreeView>
  <TreeView.ItemContainerStyle>
    inlineStyle
  </TreeView.ItemContainerStyle>
</TreeView>
- or -
<TreeView ItemContainerStyle="resourceReferenceToStyle"/>

Property Value

The style applied to the item containers. The default is null.

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