Method AtLastIndex
AtLastIndex(UIDocument, int, TypeSearch, Predicate<VisualElement>)
Retrieves aVisualElementat a specified index (counting from the end) according to the filter applied via the selector.
Declaration
public VisualElement AtLastIndex(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) according to the filter applied via the selector. |
AtLastIndex(VisualElement, int, TypeSearch, Predicate<VisualElement>)
Retrieves aVisualElementat a specified index (counting from the end) according to the filter applied via the selector.
Declaration
public VisualElement AtLastIndex(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 (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) according to the filter applied via the selector. |
AtLastIndex(IEnumerable<VisualElement>, int, TypeSearch, Predicate<VisualElement>)
Retrieves aVisualElementat a specified index (counting from the end) according to the filter applied via the selector.
Declaration
public VisualElement AtLastIndex(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 (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) according to the filter applied via the selector. |
AtLastIndex<TResult>(IEnumerable<VisualElement>, int, TypeSearch, Predicate<TResult>)
Retrieves an element at a specified index (counting from the end) according to the filter applied via the selector.
Declaration
public TResult AtLastIndex<TResult>(IEnumerable<VisualElement> hosts, int index, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElement
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
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) according to the filter applied via the selector. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |
AtLastIndex<TResult>(UIDocument, int, TypeSearch, Predicate<TResult>)
Retrieves a element at a specified index (counting from the end) according to the filter applied via the selector.
Declaration
public TResult AtLastIndex<TResult>(UIDocument document, int index, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElement
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<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. |
AtLastIndex<TResult>(VisualElement, int, TypeSearch, Predicate<TResult>)
Retrieves an element at a specified index (counting from the end) according to the filter applied via the selector.
Declaration
public TResult AtLastIndex<TResult>(VisualElement host, int index, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElement
Parameters
Type | Name | Description |
---|---|---|
VisualElement | host | VisualElementconsidered 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) according to the filter applied via the selector. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |