DataTemplateSelector.SelectTemplateCore DataTemplateSelector.SelectTemplateCore DataTemplateSelector.SelectTemplateCore DataTemplateSelector.SelectTemplateCore Method

Definition

Overloads

SelectTemplateCore(Object) SelectTemplateCore(Object) SelectTemplateCore(Object) SelectTemplateCore(Object)

When implemented by a derived class, returns a specific DataTemplate for a given item or container.

SelectTemplateCore(Object, DependencyObject) SelectTemplateCore(Object, DependencyObject) SelectTemplateCore(Object, DependencyObject) SelectTemplateCore(Object, DependencyObject)

When implemented by a derived class, returns a specific DataTemplate for a given item or container.

SelectTemplateCore(Object) SelectTemplateCore(Object) SelectTemplateCore(Object) SelectTemplateCore(Object)

When implemented by a derived class, returns a specific DataTemplate for a given item or container.

protected : virtual DataTemplate SelectTemplateCore(Platform::Object item)
virtual DataTemplate SelectTemplateCore(winrt::Windows::Foundation::IInspectable item) const;
protected virtual DataTemplate SelectTemplateCore(Object item)
Protected Overridable Function SelectTemplateCore(item As Object) As DataTemplate

Parameters

item
Object Object

The item to return a template for.

Returns

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

Remarks

If your ItemsControl.ItemsPanel is an ItemsStackPanel or ItemsWrapGrid, provide an override for the SelectTemplateCore(Object) method. If the ItemsPanel is a different panel, such as VirtualizingStackPanel or WrapGrid, provide an override for the SelectTemplateCore(Object, DependencyObject) method.

Note

In Windows 8.1, ItemsStackPanel is the default ItemsPanel for ListView, and ItemsWrapGrid is the default ItemsPanel for GridView.

See also

SelectTemplateCore(Object, DependencyObject) SelectTemplateCore(Object, DependencyObject) SelectTemplateCore(Object, DependencyObject) SelectTemplateCore(Object, DependencyObject)

When implemented by a derived class, returns a specific DataTemplate for a given item or container.

protected : virtual DataTemplate SelectTemplateCore(Platform::Object item, DependencyObject container)
virtual DataTemplate SelectTemplateCore(winrt::Windows::Foundation::IInspectable item, DependencyObject container) const;
protected virtual DataTemplate SelectTemplateCore(Object item, DependencyObject container)
Protected Overridable Function SelectTemplateCore(item As Object, container As DependencyObject) As DataTemplate

Parameters

item
Object Object

The item to return a template for.

container
DependencyObject DependencyObject

The parent container for the templated item.

Returns

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

Remarks

Most implementations will choose to implement the selection logic based on the value of either item or container, not both. Implementations should still pass the unused parameter as-is to base.

See also