Summary
Extends an
Animatable
with the following features:
- An inherited DataContext
.
- Implements IStyleable
to allow styling to work on the styled element.
- Implements ILogical
to form part of a logical tree.
- A collection of class strings for custom styling.
- Namespace
- Avalonia
- Interfaces
-
- IAvaloniaObjectDebug
- I
Notify Property Changed - IValueSink
- IStyledElement
- IStyleable
- INamed
- IStyleHost
- ILogical
- IResourceHost
- IResourceNode
- IDataContextProvider
- IAvaloniaObject
- ISupportInitialize
- ISetLogicalParent
- I
Set Inheritance Parent
- Base Types
-
- object
- AvaloniaObject
- Animatable
- Derived Types
graph BT
Type-->Base0["Animatable"]
click Base0 "/api/Avalonia.Animation/Animatable"
Base0-->Base1["AvaloniaObject"]
click Base1 "/api/Avalonia/AvaloniaObject"
Base1-->Base2["object"]
Type-.->Interface0["IAvaloniaObjectDebug"]
click Interface0 "/api/Avalonia.Diagnostics/IAvaloniaObjectDebug"
Type-.->Interface1["INotifyPropertyChanged"]
Type-.->Interface2["IValueSink"]
Type-.->Interface3["IStyledElement"]
click Interface3 "/api/Avalonia/IStyledElement"
Type-.->Interface4["IStyleable"]
click Interface4 "/api/Avalonia.Styling/IStyleable"
Type-.->Interface5["INamed"]
click Interface5 "/api/Avalonia/INamed"
Type-.->Interface6["IStyleHost"]
click Interface6 "/api/Avalonia.Styling/IStyleHost"
Type-.->Interface7["ILogical"]
click Interface7 "/api/Avalonia.LogicalTree/ILogical"
Type-.->Interface8["IResourceHost"]
click Interface8 "/api/Avalonia.Controls/IResourceHost"
Type-.->Interface9["IResourceNode"]
click Interface9 "/api/Avalonia.Controls/IResourceNode"
Type-.->Interface10["IDataContextProvider"]
click Interface10 "/api/Avalonia/IDataContextProvider"
Type-.->Interface11["IAvaloniaObject"]
click Interface11 "/api/Avalonia/IAvaloniaObject"
Type-.->Interface12["ISupportInitialize"]
Type-.->Interface13["ISetLogicalParent"]
click Interface13 "/api/Avalonia.Controls/ISetLogicalParent"
Type-.->Interface14["ISetInheritanceParent"]
click Interface14 "/api/Avalonia.Controls/ISetInheritanceParent"
Type["StyledElement"]
class Type type-node
Derived0["ScrollGestureRecognizer"]-->Type
click Derived0 "/api/Avalonia.Input.GestureRecognizers/ScrollGestureRecognizer"
Derived1["Visual"]-->Type
click Derived1 "/api/Avalonia/Visual"
Syntax
public class StyledElement : Animatable, IAvaloniaObjectDebug, INotifyPropertyChanged, IValueSink,
IStyledElement, IStyleable, INamed, IStyleHost, ILogical, IResourceHost, IResourceNode,
IDataContextProvider, IAvaloniaObject, ISupportInitialize, ISetLogicalParent,
ISetInheritanceParent
Constructors
Name | Summary |
---|---|
StyledElement |
Initializes a new instance of the StyledElement class.
|
Events
Name | Type | Summary |
---|---|---|
Attached |
EventHandler |
Raised when the styled element is attached to a rooted logical tree.
|
DataContextChanged | EventHandler? |
Occurs when the
DataContext property changes.
|
Detached |
EventHandler |
Raised when the styled element is detached from a rooted logical tree.
|
Initialized | EventHandler? |
Occurs when the styled element has finished initialization.
|
PropertyChanged | EventHandler |
Raised when a
AvaloniaProperty value changes on this object.
Inherited from AvaloniaObject
|
ResourcesChanged | EventHandler |
Occurs when a resource in this styled element or a parent styled element has changed.
|
Fields
Name | Constant Value | Summary |
---|---|---|
ClockProperty |
Defines the
Clock property.
Inherited from Animatable
static
|
|
DataContextProperty |
Defines the
DataContext property.
static
|
|
NameProperty |
Defines the
Name property.
static
|
|
ParentProperty |
Defines the
Parent property.
static
|
|
Templated |
Defines the
TemplatedParent property.
static
|
|
TransitionsProperty |
Defines the
Transitions property.
Inherited from Animatable
static
|
Properties
Name | Value | Summary |
---|---|---|
Classes | Classes |
Gets or sets the styled element's classes.
|
Clock | IClock |
Gets or sets the clock which controls the animations on the control.
Inherited from Animatable
|
DataContext | object? |
Gets or sets the control's data context.
|
InheritanceParent | IAvaloniaObject |
Gets or sets the parent object that inherited
AvaloniaProperty values
are inherited from.
Inherited from AvaloniaObject
|
IsInitialized | bool |
Gets a value that indicates whether the element has finished initialization.
|
LogicalChildren | IAvaloniaList |
Gets the styled element's logical children.
|
Name | string? |
Gets or sets the name of the styled element.
|
Parent | IStyledElement? |
Gets the styled element's logical parent.
|
PseudoClasses | IPseudoClasses |
Gets the
Classes collection in a form that allows adding and removing
pseudoclasses.
|
Resources | IResourceDictionary |
Gets or sets the styled element's resource dictionary.
|
Styles | Styles |
Gets the styles for the styled element.
|
TemplatedParent | ITemplatedControl? |
Gets the styled element whose lookless template this styled element is part of.
|
this[ |
object |
Gets or sets the value of a
AvaloniaProperty .
Inherited from AvaloniaObject
|
this[ |
IBinding |
Gets or sets a binding for a
AvaloniaProperty .
Inherited from AvaloniaObject
|
Transitions | Transitions? |
Gets or sets the property transitions for the control.
Inherited from Animatable
|