Class TemplateSelectorBase
Data template selector: Used to match types of objects with the types of views that will be used to display them in a ListView.
Inheritance
TemplateSelectorBase
Inherited Members
Namespace: Forms9Patch
Assembly: Forms9Patch.dll
Syntax
public class TemplateSelectorBase : DataTemplateSelector, IElement, IDataTemplate, IDataTemplateController
Constructors
TemplateSelectorBase()
Initializes a new instance of the DataTemplateSelector class.
Declaration
protected TemplateSelectorBase()
TemplateSelectorBase(Type)
Initializes a new instance of the Forms9Patch.GroupTemplate class.
Declaration
public TemplateSelectorBase(Type groupContentViewType)
Parameters
Type | Name | Description |
---|---|---|
Type | groupContentViewType | Group content view type. |
Fields
_cellTemplates
The cell templates.
Declaration
protected readonly Dictionary<Type, DataTemplate> _cellTemplates
Field Value
Type | Description |
---|---|
Dictionary<Type, DataTemplate> |
Methods
Add(Type, Type)
Add to the DetaTemplateSelector a viewType that will be used to display any objects of itemBaseType.
Declaration
protected void Add(Type dataType, Type viewType)
Parameters
Type | Name | Description |
---|---|---|
Type | dataType | Item base type. |
Type | viewType | View type. |
Clear()
Clear all cell templates
Declaration
public void Clear()
OnSelectTemplate(Object, BindableObject)
Triggered when a Forms9Patch.ListView needs to create a view template for an item.
Declaration
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
Parameters
Type | Name | Description |
---|---|---|
Object | item | Item. |
BindableObject | container | Container. |
Returns
Type | Description |
---|---|
DataTemplate | The select template. |
Overrides
RemoveFactoryDefaults()
Removes the factory defaults, to make more space for Andriod implementation.
Declaration
public void RemoveFactoryDefaults()