Method AtIndex
AtIndex(VisualElement, int, TypeSearch, Predicate<VisualElement>)
Retrieves aVisualElementat a specified index.
Declaration
public static VisualElement AtIndex(this VisualElement host, int index, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<VisualElement> predicate = null)Parameters
| Type | Name | Description |
|---|---|---|
| VisualElement | host | VisualElementconsidered as host. |
| int | 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, int, string, 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 = TypeSearch.Container, Predicate<VisualElement> predicate = null)Parameters
| Type | Name | Description |
|---|---|---|
| VisualElement | host | VisualElementconsidered as host. |
| int | 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>, int, TypeSearch, Predicate<VisualElement>)
Retrieves aVisualElementat a specified index.
Declaration
public static VisualElement AtIndex(this IEnumerable<VisualElement> hosts, int index, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<VisualElement> predicate = null)Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
| int | 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>, int, string, 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 = TypeSearch.Container, Predicate<VisualElement> predicate = null)Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
| int | 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<TResult>(VisualElement, int, TypeSearch, Predicate<TResult>)
Retrieves an element at a specified index.
Declaration
public static TResult AtIndex<TResult>(this VisualElement host, int index, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElementParameters
| Type | Name | Description |
|---|---|---|
| VisualElement | host | VisualElementconsidered as host. |
| int | 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, int, string, 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 = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElementParameters
| Type | Name | Description |
|---|---|---|
| VisualElement | host | VisualElementconsidered as host. |
| int | 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>, int, 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 = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElementParameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
| int | 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>, int, string, 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 = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElementParameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
| int | 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. |
