Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SelectTemplate Method
Collapse the table of content
Expand the table of content

ItemContainerTemplateSelector.SelectTemplate Method

.NET Framework 4.6 and 4.5

When overridden in a derived class, returns an ItemContainerTemplate based on custom logic.

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

public virtual DataTemplate SelectTemplate(
	Object item,
	ItemsControl parentItemsControl
)

Parameters

item
Type: System.Object

The object for which to select the template.

parentItemsControl
Type: System.Windows.Controls.ItemsControl

The container for the items.

Return Value

Type: System.Windows.DataTemplate
The template. The default implementation returns null.

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft