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.
public class Selector<T> : IEnumerable<SelectorItem<T>>
- Inheritance
-
- Derived
-
Constructors
Declaration
API Level: 9
Declaration
Parameters
Type |
Name |
Description |
T |
value |
|
Declaration
public Selector(Selector<T> value)
Parameters
Properties
Declaration
public T All { get; set; }
Property Value
Declaration
public int Count { get; }
Property Value
Declaration
public T Disabled { get; set; }
Property Value
Declaration
public T DisabledFocused { get; set; }
Property Value
Declaration
public T DisabledSelected { get; set; }
Property Value
Declaration
public T Focused { get; set; }
Property Value
View Source
IsReadOnly
Gets a value indicating whether the selector is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Declaration
public T Normal { get; set; }
Property Value
API Level: 6
Declaration
public T Other { get; set; }
Property Value
Declaration
public T Pressed { get; set; }
Property Value
API Level: 6
Declaration
public T Selected { get; set; }
Property Value
Declaration
public T SelectedFocused { get; set; }
Property Value
Declaration
public T SelectedPressed { get; set; }
Property Value
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.
|
API Level: 9
Declaration
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
API Level: 6
View Source
Clone(Selector<T>)
Copy values from other selector.
Declaration
public void Clone(Selector<T> other)
Parameters
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 Parameters
API Level: 9
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 |
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
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
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
Object |
other |
|
Returns
API Level: 9
View Source
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<SelectorItem<T>> GetEnumerator()
Returns
View Source
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
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
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
public bool Remove(SelectorItem<T> item)
Parameters
Type |
Name |
Description |
SelectorItem<T> |
item |
The selector item includes state and value.
|
Returns
Declaration
public override string ToString()
Returns
Operators
View Source
Implicit(T to Selector<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
API Level: 9
Extension Methods