Class DataTemplateSelector

Definition

Namespace:
Tizen.NUI.Binding
Assembly:
Tizen.NUI.dll
API Level:
9

Selects DataTemplate objects by data type and container.

C#
Copy
public abstract class DataTemplateSelector : DataTemplate, IElement, IDataTemplate
Inheritance
System.Object
DataTemplateSelector

Methods

View Source

OnSelectTemplate(Object, BindableObject)

The developer overrides this method to return a valid data template for the specified item. This method is called by SelectTemplate(Object, BindableObject).

Declaration
C#
Copy
protected abstract DataTemplate OnSelectTemplate(object item, BindableObject container)
Parameters
Type Name Description
System.Object item

The data for which to return a template.

BindableObject container

An optional container object in which the developer may have opted to store DataTemplateSelector objects.

Returns
Type Description
DataTemplate

A developer-defined DataTemplate that can be used to display item.

API Level: 9
View Source

SelectTemplate(Object, BindableObject)

Returns a DataTemplate for item by calling OnSelectTemplate(Object, BindableObject) and verifying its result.

Declaration
C#
Copy
public DataTemplate SelectTemplate(object item, BindableObject container)
Parameters
Type Name Description
System.Object item

The data for which to return a template.

BindableObject container

An optional container object in which the developer may have opted to store DataTemplateSelector objects.

Returns
Type Description
DataTemplate

A developer-defined DataTemplate that can be used to display item.

API Level: 9