Method Find
Find(UIDocument, TypeSearch, Predicate<VisualElement>)
Retrieves allVisualElement.
Declaration
public static List<VisualElement> Find(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 | Description |
---|---|
List<VisualElement> | List ofVisualElement. |
Find(UIDocument, string, TypeSearch, Predicate<VisualElement>)
Retrieves allVisualElementfiltered according to the selector.
Declaration
public static List<VisualElement> Find(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 | Description |
---|---|
List<VisualElement> | List ofVisualElementfiltered according to the selector. |
Find<TResult>(UIDocument, TypeSearch, Predicate<TResult>)
Retrieves all elements.
Declaration
public static List<TResult> Find<TResult>(this 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 |
---|---|
List<TResult> | List of elements. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |
Find<TResult>(UIDocument, string, TypeSearch, Predicate<TResult>)
Retrieves all elements filtered according to the selector.
Declaration
public static List<TResult> Find<TResult>(this UIDocument document, string selector, 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. |
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 |
---|---|
List<TResult> | List of elements filtered according to the selector. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result based on the class.VisualElement. |