Method AtIndex
AtIndex<TResult>(VisualElement, Int32, UIToolkitComponent.TypeSearch, Predicate<TResult>)
Retrieves an element at a specified index.
Declaration
public static TResult AtIndex<TResult>(this VisualElement host, int index, UIToolkitComponent.TypeSearch searchFrom = UIToolkitComponent.TypeSearch.Container, Predicate<TResult> predicate = null)
where TResult : VisualElement
Parameters
Type | Name | Description |
---|---|---|
VisualElement | host | VisualElementconsidered as host. |
Int32 | index | Index of the element to retrieve. |
UIToolkitComponent.TypeSearch | searchFrom | Target children from the parent's container (indirect) or via the hierarchy (direct). |
Predicate<TResult> | predicate | Function to filter the result. |
Returns
Type | Description |
---|---|
TResult | The element retrieved at the specified index. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |
AtIndex<TResult>(VisualElement, Int32, String, UIToolkitComponent.TypeSearch, Predicate<TResult>)
Retrieves an element at a specified index according to the filter applied via the selector.
Declaration
public static TResult AtIndex<TResult>(this VisualElement host, int index, string selector, UIToolkitComponent.TypeSearch searchFrom = UIToolkitComponent.TypeSearch.Container, Predicate<TResult> predicate = null)
where TResult : VisualElement
Parameters
Type | Name | Description |
---|---|---|
VisualElement | host | VisualElementconsidered as host. |
Int32 | index | Index of the element to retrieve. |
String | selector | The text to be parsed as a selector. |
UIToolkitComponent.TypeSearch | searchFrom | Target children from the parent's container (indirect) or via the hierarchy (direct). |
Predicate<TResult> | predicate | Function to filter the result. |
Returns
Type | Description |
---|---|
TResult | The element retrieved at the specified index according to the filter applied via the selector. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |
AtIndex<TResult>(IEnumerable<VisualElement>, Int32, UIToolkitComponent.TypeSearch, Predicate<TResult>)
Retrieves an element at a specified index.
Declaration
public static TResult AtIndex<TResult>(this IEnumerable<VisualElement> hosts, int index, UIToolkitComponent.TypeSearch searchFrom = UIToolkitComponent.TypeSearch.Container, Predicate<TResult> predicate = null)
where TResult : VisualElement
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
Int32 | index | Index of the element to retrieve. |
UIToolkitComponent.TypeSearch | searchFrom | Target children from the parent's container (indirect) or via the hierarchy (direct). |
Predicate<TResult> | predicate | Function to filter the result. |
Returns
Type | Description |
---|---|
TResult | The element retrieved at the specified index. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |
AtIndex<TResult>(IEnumerable<VisualElement>, Int32, String, UIToolkitComponent.TypeSearch, Predicate<TResult>)
Retrieves an element at a specified index according to the filter applied via the selector.
Declaration
public static TResult AtIndex<TResult>(this IEnumerable<VisualElement> hosts, int index, string selector, UIToolkitComponent.TypeSearch searchFrom = UIToolkitComponent.TypeSearch.Container, Predicate<TResult> predicate = null)
where TResult : VisualElement
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
Int32 | index | Index of the element to retrieve. |
String | selector | The text to be parsed as a selector. |
UIToolkitComponent.TypeSearch | searchFrom | Target children from the parent's container (indirect) or via the hierarchy (direct). |
Predicate<TResult> | predicate | Function to filter the result. |
Returns
Type | Description |
---|---|
TResult | The element retrieved at the specified index according to the filter applied via the selector. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |
AtIndex(VisualElement, Int32, UIToolkitComponent.TypeSearch, Predicate<VisualElement>)
Retrieves aVisualElementat a specified index.
Declaration
public static VisualElement AtIndex(this VisualElement host, int index, UIToolkitComponent.TypeSearch searchFrom = UIToolkitComponent.TypeSearch.Container, Predicate<VisualElement> predicate = null)
Parameters
Type | Name | Description |
---|---|---|
VisualElement | host | VisualElementconsidered as host. |
Int32 | index | Index of the element to retrieve. |
UIToolkitComponent.TypeSearch | searchFrom | Target children from the parent's container (indirect) or via the hierarchy (direct). |
Predicate<VisualElement> | predicate | Function to filter the result. |
Returns
Type | Description |
---|---|
VisualElement | TheVisualElementretrieved at the specified index. |
AtIndex(VisualElement, Int32, String, UIToolkitComponent.TypeSearch, Predicate<VisualElement>)
Retrieves aVisualElementat a specified index according to the filter applied via the selector.
Declaration
public static VisualElement AtIndex(this VisualElement host, int index, string selector, UIToolkitComponent.TypeSearch searchFrom = UIToolkitComponent.TypeSearch.Container, Predicate<VisualElement> predicate = null)
Parameters
Type | Name | Description |
---|---|---|
VisualElement | host | VisualElementconsidered as host. |
Int32 | index | Index of the element to retrieve. |
String | selector | The text to be parsed as a selector. |
UIToolkitComponent.TypeSearch | searchFrom | Target children from the parent's container (indirect) or via the hierarchy (direct). |
Predicate<VisualElement> | predicate | Function to filter the result. |
Returns
Type | Description |
---|---|
VisualElement | TheVisualElementretrieved at the specified index according to the filter applied via the selector. |
AtIndex(IEnumerable<VisualElement>, Int32, UIToolkitComponent.TypeSearch, Predicate<VisualElement>)
Retrieves aVisualElementat a specified index.
Declaration
public static VisualElement AtIndex(this IEnumerable<VisualElement> hosts, int index, UIToolkitComponent.TypeSearch searchFrom = UIToolkitComponent.TypeSearch.Container, Predicate<VisualElement> predicate = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
Int32 | index | Index of the element to retrieve. |
UIToolkitComponent.TypeSearch | searchFrom | Target children from the parent's container (indirect) or via the hierarchy (direct). |
Predicate<VisualElement> | predicate | Function to filter the result. |
Returns
Type | Description |
---|---|
VisualElement | TheVisualElementretrieved at the specified index. |
AtIndex(IEnumerable<VisualElement>, Int32, String, UIToolkitComponent.TypeSearch, Predicate<VisualElement>)
Retrieves aVisualElementat a specified index according to the filter applied via the selector.
Declaration
public static VisualElement AtIndex(this IEnumerable<VisualElement> hosts, int index, string selector, UIToolkitComponent.TypeSearch searchFrom = UIToolkitComponent.TypeSearch.Container, Predicate<VisualElement> predicate = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
Int32 | index | Index of the element to retrieve. |
String | selector | The text to be parsed as a selector. |
UIToolkitComponent.TypeSearch | searchFrom | Target children from the parent's container (indirect) or via the hierarchy (direct). |
Predicate<VisualElement> | predicate | Function to filter the result. |
Returns
Type | Description |
---|---|
VisualElement | TheVisualElementretrieved at the specified index according to the filter applied via the selector. |