Method Match
Match(IEnumerable<VisualElement>, VisualElement, 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 bool Match(IEnumerable<VisualElement> hosts, VisualElement element, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Selector.MatchCombinator firstElementAs = MatchCombinator.Self)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<VisualElement> | hosts | List ofVisualElementconsidered as hosts. |
VisualElement | element | TheVisualElementto check. |
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 |
Match(UIDocument, VisualElement, 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 bool Match(UIDocument document, VisualElement element, 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. |
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 |
Match(VisualElement, VisualElement, TypeSearch, MatchCombinator)
Checks if there is a match between the currentVisualElement(through a combinator) and the host, filtered by the selector..
The combinator is used to know the relationship between the currentVisualElementand the targetedVisualElementfrom the selector.
Declaration
public bool Match(VisualElement host, VisualElement element, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Selector.MatchCombinator firstElementAs = MatchCombinator.Self)
Parameters
Type | Name | Description |
---|---|---|
VisualElement | host | VisualElementconsidered as host. |
VisualElement | element | TheVisualElementto check. |
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 |