Class Selector<T>

    Definition

    Namespace:
    Tizen.NUI.BaseComponents
    Assembly:
    Tizen.NUI.dll

    The selector class is a collection of a ControlState and a T value pair.

    public class Selector<T> : IEnumerable<SelectorItem<T>>
    Inheritance
    object
    Selector<T>
    Derived
    ColorSelector
    FloatSelector
    IntSelector
    RectangleSelector
    StringSelector
    Vector2Selector

    Constructors

    View Source

    Selector()

    Create an empty selector. This constructor returns an empty selector object which can be used to define various selectors for different states and conditions.

    Declaration
    public Selector()
    View Source

    Selector(T)

    Declaration
    public Selector(T value)
    Parameters
    Type Name Description
    T value
    View Source

    Selector(Selector<T>)

    Declaration
    public Selector(Selector<T> value)
    Parameters
    Type Name Description
    Selector<T> value

    Properties

    View Source

    All

    All State.

    Declaration
    public T All { get; set; }
    Property Value
    Type Description
    T
    View Source

    Count

    Gets the number of elements.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int
    View Source

    Disabled

    Disabled State.

    Declaration
    public T Disabled { get; set; }
    Property Value
    Type Description
    T
    View Source

    DisabledFocused

    DisabledFocused State.

    Declaration
    public T DisabledFocused { get; set; }
    Property Value
    Type Description
    T
    View Source

    DisabledSelected

    DisabledSelected State.

    Declaration
    public T DisabledSelected { get; set; }
    Property Value
    Type Description
    T
    View Source

    Focused

    Focused State.

    Declaration
    public T Focused { get; set; }
    Property Value
    Type Description
    T
    View Source

    IsReadOnly

    Gets a value indicating whether the selector is read-only.

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    bool
    View Source

    Normal

    Normal State.

    Declaration
    public T Normal { get; set; }
    Property Value
    Type Description
    T
    View Source

    Other

    Other State.

    Declaration
    public T Other { get; set; }
    Property Value
    Type Description
    T
    View Source

    Pressed

    Pressed State.

    Declaration
    public T Pressed { get; set; }
    Property Value
    Type Description
    T
    View Source

    Selected

    Selected State.

    Declaration
    public T Selected { get; set; }
    Property Value
    Type Description
    T
    View Source

    SelectedFocused

    Gets or sets the value associated with the SelectedFocused state.

    Declaration
    public T SelectedFocused { get; set; }
    Property Value
    Type Description
    T
    View Source

    SelectedPressed

    SelectedPressed State.

    Declaration
    public T SelectedPressed { get; set; }
    Property Value
    Type Description
    T

    Methods

    View Source

    Add(ControlState, T)

    Adds the specified state and value to the selector.

    Declaration
    public void Add(ControlState state, T value)
    Parameters
    Type Name Description
    ControlState state

    The state.

    T value

    The value associated with state.

    View Source

    Add(SelectorItem<T>)

    Adds the specified state and value to the selector.

    Declaration
    public void Add(SelectorItem<T> item)
    Parameters
    Type Name Description
    SelectorItem<T> item

    The selector item includes state and value.

    View Source

    Clear()

    Removes all elements.

    Declaration
    public void Clear()
    View Source

    Clone()

    Clone itself. If type T implements ICloneable, it calls Clone() method to clone values, otherwise use operator=.

    Declaration
    public Selector<T> Clone()
    Returns
    Type Description
    Selector<T>

    A new Selector T instance that is a clone of the current selector.

    View Source

    Clone(Selector<T>)

    Copy values from other selector.

    Declaration
    public void Clone(Selector<T> other)
    Parameters
    Type Name Description
    Selector<T> other
    View Source

    Clone<TOut>(Converter<T, TOut>)

    Clone with type converter.

    Declaration
    public Selector<TOut> Clone<TOut>(Converter<T, TOut> converter)
    Parameters
    Type Name Description
    Converter<, ><T, TOut> converter
    Returns
    Type Description
    Selector<TOut>
    Type Parameters
    Name Description
    TOut
    View Source

    Contains(SelectorItem<T>)

    Determines whether the selector contains a specific value.

    Declaration
    public bool Contains(SelectorItem<T> item)
    Parameters
    Type Name Description
    SelectorItem<T> item

    The selector item includes state and value.

    Returns
    Type Description
    bool

    True if item is found in the selector. otherwise, false.

    View Source

    CopyTo(SelectorItem<T>[], int)

    Copies the elements of the selector to an Array, starting at a particular Array index.

    Declaration
    public void CopyTo(SelectorItem<T>[] items, int startIndex)
    Parameters
    Type Name Description
    SelectorItem<T>[] items

    The one-dimensional array that is the destination of the elements copied from selector. The Array must have zero-based indexing.

    int startIndex

    The zero-based index in array at which copying begins.

    View Source

    Equals(object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object other)
    Parameters
    Type Name Description
    object other

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    View Source

    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Declaration
    public IEnumerator<SelectorItem<T>> GetEnumerator()
    Returns
    Type Description
    IEnumerator<><SelectorItem<T>>

    An enumerator that can be used to iterate through the collection.

    View Source

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    An integer value that specifies the hash code for this instance.

    View Source

    GetValue(ControlState, out T)

    Get value by State. It will traverse from the first item to find proper fit when there is no perfect state match.

    Declaration
    public bool GetValue(ControlState state, out T result)
    Parameters
    Type Name Description
    ControlState state

    The state to query for the value.

    T result

    The output parameter to store the resulting value if found.

    Returns
    Type Description
    bool

    True if the selector has a given state value, false otherwise.

    View Source

    Remove(SelectorItem<T>)

    Remove an item from the selector.

    Declaration
    public bool Remove(SelectorItem<T> item)
    Parameters
    Type Name Description
    SelectorItem<T> item

    The selector item includes state and value.

    Returns
    Type Description
    bool
    View Source

    ToString()

    Converts the Selector object to its string representation.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current selector.

    Operators

    View Source

    implicit operator Selector<T>(T)

    Implicitly convert T type value to selector.

    Declaration
    public static implicit operator Selector<T>(T value)
    Parameters
    Type Name Description
    T value

    The value will be converted to a selector.

    Returns
    Type Description
    Selector<T>

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX