Method GetLast
GetLast(VisualElement, TypeSearch, Predicate<VisualElement>)
Retrieves the lastVisualElement.
Declaration
public static VisualElement GetLast(this VisualElement host, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<VisualElement> predicate = null)
Parameters
Type | Name | Description |
---|---|---|
VisualElement | host | VisualElementconsidered as host. |
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 | LastVisualElementretrieved. |
GetLast(VisualElement, string, TypeSearch, Predicate<VisualElement>)
Retrieves the lastVisualElementaccording to the filter applied via the selector.
Declaration
public static VisualElement GetLast(this VisualElement host, string selector, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<VisualElement> predicate = null)
Parameters
Type | Name | Description |
---|---|---|
VisualElement | host | VisualElementconsidered as host. |
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 | LastVisualElementretrieve according to the filter applied via the selector. |
GetLast(IEnumerable<VisualElement>, TypeSearch, Predicate<VisualElement>)
Retrieves the lastVisualElement.
Declaration
public static VisualElement GetLast(this IEnumerable<VisualElement> hosts, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<VisualElement> predicate = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
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 | LastVisualElementretrieved. |
GetLast(IEnumerable<VisualElement>, string, TypeSearch, Predicate<VisualElement>)
Retrieves the lastVisualElementaccording to the filter applied via the selector.
Declaration
public static VisualElement GetLast(this IEnumerable<VisualElement> hosts, string selector, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<VisualElement> predicate = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
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 | LastVisualElementretrieve according to the filter applied via the selector. |
GetLast<TResult>(VisualElement, TypeSearch, Predicate<TResult>)
Retrieves the last element.
Declaration
public static TResult GetLast<TResult>(this VisualElement host, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElement
Parameters
Type | Name | Description |
---|---|---|
VisualElement | host | VisualElementconsidered as host. |
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 | Last element retrieved. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |
GetLast<TResult>(VisualElement, string, TypeSearch, Predicate<TResult>)
Retrieves the last element according to the filter applied via the selector.
Declaration
public static TResult GetLast<TResult>(this VisualElement host, string selector, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElement
Parameters
Type | Name | Description |
---|---|---|
VisualElement | host | VisualElementconsidered as host. |
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 | Last element retrieved according to the filter applied via the selector. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |
GetLast<TResult>(IEnumerable<VisualElement>, TypeSearch, Predicate<TResult>)
Retrieves the last element.
Declaration
public static TResult GetLast<TResult>(this IEnumerable<VisualElement> hosts, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElement
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
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 | Last element retrieved. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |
GetLast<TResult>(IEnumerable<VisualElement>, string, TypeSearch, Predicate<TResult>)
Retrieves the last element according to the filter applied via the selector.
Declaration
public static TResult GetLast<TResult>(this IEnumerable<VisualElement> hosts, string selector, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElement
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
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 | Last element retrieved according to the filter applied via the selector. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |