Selector Class

Summary

A selector in a Style.
Namespace
Avalonia.Styling
Base Types
  • object
graph TD Base0["object"]-->Type Type["Selector"] class Type type-node

Syntax

public abstract class Selector

Properties

Name Value Summary
InTemplate bool
Gets a value indicating whether either this selector or a previous selector has moved into a template.
IsCombinator bool
Gets a value indicating whether this selector is a combinator.
TargetType Type
Gets the target type of the selector, if available.

Methods

Name Value Summary
Evaluate(IStyleable, bool) SelectorMatch
Evaluates the selector for a match.
Match(IStyleable, bool) SelectorMatch
Tries to match the selector with a control.
MovePrevious() Selector
Moves to the previous selector.

Extension Methods

Name Value Summary
Child() Selector
Returns a selector which matches a previous selector's child.
Class(string) Selector
Returns a selector which matches a control's style class.
Descendant() Selector
Returns a selector which matches a descendant of a previous selector.
Is(Type) Selector
Returns a selector which matches a type or a derived type.
Is<T>() Selector
Returns a selector which matches a type or a derived type.
Name(string) Selector
Returns a selector which matches a control's Name.
Not(Func<Selector, Selector>) Selector
Returns a selector which inverts the results of selector argument.
OfType(Type) Selector
Returns a selector which matches a type.
OfType<T>() Selector
Returns a selector which matches a type.
PropertyEquals(AvaloniaProperty, object) Selector
Returns a selector which matches a control with the specified property value.
PropertyEquals<T>(AvaloniaProperty<T>, object) Selector
Returns a selector which matches a control with the specified property value.
Template() Selector
Returns a selector which enters a lookless control's template.