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