Method GetLast
GetLast(UIDocument, TypeSearch, Predicate<VisualElement>)
Retrieves the lastVisualElementaccording to the filter applied via the selector.
Declaration
public VisualElement GetLast(UIDocument document, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<VisualElement> predicate = null)
Parameters
Type | Name | Description |
---|---|---|
UIDocument | document | TheUIDocumentcontaining theTemplateContainerthat will be considered 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 according to the filter applied via the selector. |
GetLast(VisualElement, TypeSearch, Predicate<VisualElement>)
Retrieves the lastVisualElementaccording to the filter applied via the selector.
Declaration
public VisualElement GetLast(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 | LastVisualElementretrieve according to the filter applied via the selector. |
GetLast(IEnumerable<VisualElement>, TypeSearch, Predicate<VisualElement>)
Retrieves the lastVisualElementaccording to the filter applied via the selector.
Declaration
public VisualElement GetLast(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 | LastVisualElementretrieve according to the filter applied via the selector. |
GetLast<TResult>(IEnumerable<VisualElement>, TypeSearch, Predicate<TResult>)
Retrieves the last element according to the filter applied via the selector.
Declaration
public TResult GetLast<TResult>(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 according to the filter applied via the selector. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |
GetLast<TResult>(UIDocument, TypeSearch, Predicate<TResult>)
Retrieves the last element according to the filter applied via the selector.
Declaration
public TResult GetLast<TResult>(UIDocument document, 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. |
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 selector according to the filter applied via the selector. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |
GetLast<TResult>(VisualElement, TypeSearch, Predicate<TResult>)
Retrieves the last element according to the filter applied via the selector.
Declaration
public TResult GetLast<TResult>(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 according to the filter applied via the selector. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |