Method Match
Match(VisualElement, VisualElement, string, 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 static bool Match(this VisualElement host, VisualElement element, string selector, UIToolkitComponent.TypeSearch searchFrom = TypeSearch.Container, Selector.MatchCombinator firstElementAs = MatchCombinator.Self)Parameters
| Type | Name | Description |
|---|---|---|
| VisualElement | host | VisualElementconsidered 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 |
Match(IEnumerable<VisualElement>, 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 IEnumerable<VisualElement> hosts, VisualElement element, string selector, 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. |
| 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 |
