Method AtLastIndex
AtLastIndex(UIDocument, int, TypeSearch, Predicate<VisualElement>)
Retrieves aVisualElementat a specified index (counting from the end).
Declaration
public static VisualElement AtLastIndex(this UIDocument document, int index, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<VisualElement> predicate = null)Parameters
| Type | Name | Description |
|---|---|---|
| UIDocument | document | TheUIDocumentcontaining theTemplateContainerthat will be considered as host. |
| int | index | Index of the element to retrieve (counting from the end). |
| 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 (counting from the end). |
AtLastIndex(UIDocument, int, string, TypeSearch, Predicate<VisualElement>)
Retrieves aVisualElementat a specified index (counting from the end) according to the filter applied via the selector.
Declaration
public static VisualElement AtLastIndex(this UIDocument document, int index, string selector, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<VisualElement> predicate = null)Parameters
| Type | Name | Description |
|---|---|---|
| UIDocument | document | TheUIDocumentcontaining theTemplateContainerthat will be considered as host. |
| int | index | Index of the element to retrieve (counting from the end). |
| 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 (counting from the end) according to the filter applied via the selector. |
AtLastIndex<TResult>(UIDocument, int, TypeSearch, Predicate<TResult>)
Retrieves a element at a specified index (counting from the end).
Declaration
public static TResult AtLastIndex<TResult>(this UIDocument document, int index, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElementParameters
| Type | Name | Description |
|---|---|---|
| UIDocument | document | TheUIDocumentcontaining theTemplateContainerthat will be considered as host. |
| int | index | Index of the element to retrieve (counting from the end). |
| 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 (counting from the end). |
Type Parameters
| Name | Description |
|---|---|
| TResult | Type of the result based on the class.VisualElement. |
AtLastIndex<TResult>(UIDocument, int, string, TypeSearch, Predicate<TResult>)
Retrieves a element at a specified index (counting from the end) according to the filter applied via the selector.
Declaration
public static TResult AtLastIndex<TResult>(this UIDocument document, int index, string selector, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElementParameters
| Type | Name | Description |
|---|---|---|
| UIDocument | document | TheUIDocumentcontaining theTemplateContainerthat will be considered as host. |
| int | index | Index of the element to retrieve (counting from the end). |
| 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 (counting from the end) according to the filter applied via the selector. |
Type Parameters
| Name | Description |
|---|---|
| TResult | Type of the result based on the class.VisualElement. |
