Partager via


TreeViewItem.GetContainerForItemOverride Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Creates a TreeViewItem to display content.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls (in System.Windows.Controls.dll)

Syntax

'Declaration
Protected Overrides Function GetContainerForItemOverride As DependencyObject
protected override DependencyObject GetContainerForItemOverride()

Return Value

Type: System.Windows.DependencyObject
A TreeViewItem to use as a container for content.

Remarks

Use this method when you need the TreeViewItem to use a container object other than TreeViewItem objects. You override this method in a derived class and return a custom item container.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.