Method Exists
Exists(UIDocument, TypeSearch, Predicate<VisualElement>)
Checks if there is aVisualElementaccording to the filter applied via the selector.
Declaration
public bool Exists(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(VisualElement, TypeSearch, Predicate<VisualElement>)
Checks if there is aVisualElementaccording to the filter applied via the selector.
Declaration
public bool Exists(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(IEnumerable<VisualElement>, TypeSearch, Predicate<VisualElement>)
Checks if there is aVisualElementaccording to the filter applied via the selector.
Declaration
public bool Exists(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<TResult>(IEnumerable<VisualElement>, TypeSearch, Predicate<TResult>)
Checks if there is an element according to the filter applied via the selector.
Declaration
public bool Exists<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 |
---|
bool |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |
Exists<TResult>(UIDocument, TypeSearch, Predicate<TResult>)
Checks if there is a element according to the filter applied via the selector.
Declaration
public bool Exists<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 |
---|
bool |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |
Exists<TResult>(VisualElement, TypeSearch, Predicate<TResult>)
Checks if there is an element according to the filter applied via the selector.
Declaration
public bool Exists<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 |
---|
bool |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |