Show / Hide Table of Contents

    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
    Object
    ElementTemplate
    DataTemplate
    DataTemplateSelector
    TemplateSelectorBase
    DataTemplateSelector
    Inherited Members
    DataTemplateSelector.SelectTemplate(Object, BindableObject)
    DataTemplate.SetBinding(BindableProperty, BindingBase)
    DataTemplate.SetValue(BindableProperty, Object)
    DataTemplate.Bindings
    DataTemplate.Values
    ElementTemplate.CreateContent()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    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
    DataTemplateSelector.OnSelectTemplate(Object, BindableObject)

    RemoveFactoryDefaults()

    Removes the factory defaults, to make more space for Andriod implementation.

    Declaration
    public void RemoveFactoryDefaults()

    Extension Methods

    DebugExtensions.AddToCensus(Object)
    DebugExtensions.RemoveFromCensus(Object)
    ReflectionExtensions.GetProperties(Object)
    ReflectionExtensions.GetProperty(Object, String)
    ReflectionExtensions.PropertyNames(Object)
    ReflectionExtensions.PropertyExists(Object, String)
    ReflectionExtensions.HasProperty(Object, String)
    ReflectionExtensions.GetPropertyValue(Object, String)
    ReflectionExtensions.SetPropertyValue(Object, String, Object)
    ReflectionExtensions.GetFieldValue(Object, String)
    ReflectionExtensions.SetFieldValue(Object, String, Object)
    ReflectionExtensions.CallMethod(Object, String, Object[])
    Back to top Copyright © 2018 42nd Parallel