DataTemplateSelector.SelectTemplate Method

Definition

Overloads

SelectTemplate(Object)

Returns a specific DataTemplate for a given item.

Equivalent WinUI method: Microsoft.UI.Xaml.Controls.DataTemplateSelector.SelectTemplate.

SelectTemplate(Object, DependencyObject)

Returns a specific DataTemplate for a given item and container.

Equivalent WinUI method: Microsoft.UI.Xaml.Controls.DataTemplateSelector.SelectTemplate.

SelectTemplate(Object)

Returns a specific DataTemplate for a given item.

Equivalent WinUI method: Microsoft.UI.Xaml.Controls.DataTemplateSelector.SelectTemplate.

/// [Windows.Foundation.Metadata.Overload("SelectTemplateForItem")]
DataTemplate SelectTemplate(IInspectable const & item);
[Windows.Foundation.Metadata.Overload("SelectTemplateForItem")]
public DataTemplate SelectTemplate(object item);
function selectTemplate(item)
Public Function SelectTemplate (item As Object) As DataTemplate

Parameters

item
Object

The item to return a template for.

Returns

DataTemplate

The template to use for the given item and/or container.

Attributes

See also

Applies to

SelectTemplate(Object, DependencyObject)

Returns a specific DataTemplate for a given item and container.

Equivalent WinUI method: Microsoft.UI.Xaml.Controls.DataTemplateSelector.SelectTemplate.

DataTemplate SelectTemplate(IInspectable const & item, DependencyObject const & container);
public DataTemplate SelectTemplate(object item, DependencyObject container);
function selectTemplate(item, container)
Public Function SelectTemplate (item As Object, container As DependencyObject) As DataTemplate

Parameters

item
Object

The item to return a template for.

container
DependencyObject

The parent container for the templated item.

Returns

DataTemplate

The template to use for the given item and/or container.

See also

Applies to