Method Match
Match(UIDocument, VisualElement, string, TypeSearch, MatchCombinator)
Checks if there is a match between the currentVisualElement(through a combinator) and the hosts, filtered by the selector.
The combinator is used to know the relationship between the currentVisualElementand the targetedVisualElementfrom the selector.
Declaration
public static bool Match(this UIDocument document, VisualElement element, string selector, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Selector.MatchCombinator firstElementAs = MatchCombinator.Self)
Parameters
Type | Name | Description |
---|---|---|
UIDocument | document | TheUIDocumentcontaining theTemplateContainerthat will be considered as host. |
VisualElement | element | TheVisualElementto check. |
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). |
Selector.MatchCombinator | firstElementAs | The combinator to use on the targetedVisualElement. |
Returns
Type |
---|
bool |