Class Selector<T>

Definition

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

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

C#
Copy
public class Selector<T> : IEnumerable<SelectorItem<T>>
Inheritance
Selector<T>
Derived

Constructors

View Source

Selector()

Create an empty selector.

Declaration
C#
Copy
public Selector()
API Level: 9
View Source

Selector(T)

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

Selector(Selector<T>)

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

Properties

View Source

All

All State.

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

Count

Gets the number of elements.

Declaration
C#
Copy
public int Count { get; }
Property Value
Type Description
Int32
View Source

Disabled

Disabled State.

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

DisabledFocused

DisabledFocused State.

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

DisabledSelected

DisabledSelected State.

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

Focused

Focused State.

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

IsReadOnly

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

Declaration
C#
Copy
public bool IsReadOnly { get; }
Property Value
Type Description
Boolean
View Source

Normal

Normal State.

Declaration
C#
Copy
public T Normal { get; set; }
Property Value
Type Description
T
API Level: 6
View Source

Other

Other State.

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

Pressed

Pressed State.

Declaration
C#
Copy
public T Pressed { get; set; }
Property Value
Type Description
T
API Level: 6
View Source

Selected

Selected State.

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

SelectedFocused

SelectedFocused State.

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

SelectedPressed

SelectedPressed State.

Declaration
C#
Copy
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
C#
Copy
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
C#
Copy
public void Add(SelectorItem<T> item)
Parameters
Type Name Description
SelectorItem<T> item

The selector item includes state and value.

API Level: 9
View Source

Clear()

Removes all elements.

Declaration
C#
Copy
public void Clear()
View Source

Clone()

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

Declaration
C#
Copy
public Selector<T> Clone()
Returns
Type Description
Selector<T>
API Level: 6
View Source

Clone(Selector<T>)

Copy values from other selector.

Declaration
C#
Copy
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
C#
Copy
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
API Level: 9
View Source

Contains(SelectorItem<T>)

Determines whether the selector contains a specific value.

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

The selector item includes state and value.

Returns
Type Description
Boolean

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

View Source

CopyTo(SelectorItem<T>[], Int32)

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

Declaration
C#
Copy
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.

Int32 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
C#
Copy
public override bool Equals(object other)
Parameters
Type Name Description
Object other
Returns
Type Description
Boolean
API Level: 9
View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
C#
Copy
public IEnumerator<SelectorItem<T>> GetEnumerator()
Returns
Type Description
IEnumerator<SelectorItem<T>>
View Source

GetHashCode()

Serves as the default hash function.

Declaration
C#
Copy
public override int GetHashCode()
Returns
Type Description
Int32
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
C#
Copy
public bool GetValue(ControlState state, out T result)
Parameters
Type Name Description
ControlState state
T result
Returns
Type Description
Boolean

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

API Level: 6
View Source

Remove(SelectorItem<T>)

Remove an item from the selector.

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

The selector item includes state and value.

Returns
Type Description
Boolean
View Source

ToString()

Declaration
C#
Copy
public override string ToString()
Returns
Type Description
String

Operators

View Source

Implicit(T to Selector<T>)

Implicitly convert T type value to selector.

Declaration
C#
Copy
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>
API Level: 9

Extension Methods