Class StyleBase
Base class for Style and ControlTheme.
public abstract class StyleBase : AvaloniaObject, INotifyPropertyChanged, IStyle, IResourceProvider, IResourceNode
- Inheritance
-
StyleBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
StyleBase()
protected StyleBase()
Properties
Animations
public IList<IAnimation> Animations { get; }
Property Value
Children
public IList<IStyle> Children { get; }
Property Value
Owner
Gets the owner of the resource provider.
public IResourceHost? Owner { get; }
Property Value
Remarks
If multiple owners are added, returns the first.
Parent
public IStyle? Parent { get; }
Property Value
Resources
public IResourceDictionary Resources { get; set; }
Property Value
Setters
public IList<SetterBase> Setters { get; }
Property Value
Methods
Add(IStyle)
public void Add(IStyle style)
Parameters
style
IStyle
Add(SetterBase)
public void Add(SetterBase setter)
Parameters
setter
SetterBase
TryGetResource(object, ThemeVariant?, out object?)
Tries to find a resource within the object.
public bool TryGetResource(object key, ThemeVariant? themeVariant, out object? result)
Parameters
key
objectThe resource key.
themeVariant
ThemeVariantresult
object
Returns
- bool
True if the resource if found, otherwise false.
Events
OwnerChanged
Raised when the Owner of the resource provider changes.
public event EventHandler? OwnerChanged