Method Exists
Exists(VisualElement, TypeSearch, Predicate<VisualElement>)
Checks if there is aVisualElement.
Declaration
public static bool Exists(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 |
|---|
| bool |
Exists(VisualElement, string, TypeSearch, Predicate<VisualElement>)
Checks if there is aVisualElementaccording to the filter applied via the selector.
Declaration
public static bool Exists(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 |
|---|
| bool |
Exists(IEnumerable<VisualElement>, TypeSearch, Predicate<VisualElement>)
Checks if there is aVisualElement.
Declaration
public static bool Exists(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 |
|---|
| bool |
Exists(IEnumerable<VisualElement>, string, TypeSearch, Predicate<VisualElement>)
Checks if there is aVisualElementaccording to the filter applied via the selector.
Declaration
public static bool Exists(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 |
|---|
| bool |
Exists<TResult>(VisualElement, TypeSearch, Predicate<TResult>)
Checks if there is an element.
Declaration
public static bool Exists<TResult>(this VisualElement host, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElementParameters
| 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 |
|---|
| bool |
Type Parameters
| Name | Description |
|---|---|
| TResult | Type of the result based on the class.VisualElement. |
Exists<TResult>(VisualElement, string, TypeSearch, Predicate<TResult>)
Checks if there is an element according to the filter applied via the selector.
Declaration
public static bool Exists<TResult>(this VisualElement host, string selector, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElementParameters
| 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 |
|---|
| bool |
Type Parameters
| Name | Description |
|---|---|
| TResult | Type of the result based on the class.VisualElement. |
Exists<TResult>(IEnumerable<VisualElement>, TypeSearch, Predicate<TResult>)
Checks if there is an element.
Declaration
public static bool Exists<TResult>(this IEnumerable<VisualElement> hosts, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElementParameters
| 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 |
|---|
| bool |
Type Parameters
| Name | Description |
|---|---|
| TResult | Type of the result based on the class.VisualElement. |
Exists<TResult>(IEnumerable<VisualElement>, string, TypeSearch, Predicate<TResult>)
Checks if there is an element according to the filter applied via the selector.
Declaration
public static bool Exists<TResult>(this IEnumerable<VisualElement> hosts, string selector, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Predicate<TResult> predicate = null) where TResult : VisualElementParameters
| 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 |
|---|
| bool |
Type Parameters
| Name | Description |
|---|---|
| TResult | Type of the result based on the class.VisualElement. |
