AvaloniaObject Class

Summary

An object with AvaloniaProperty support.
graph TD Base0["object"]-->Type Interface0["IAvaloniaObject"]-.->Type click Interface0 "/api/Avalonia/IAvaloniaObject" Interface1["IAvaloniaObjectDebug"]-.->Type click Interface1 "/api/Avalonia.Diagnostics/IAvaloniaObjectDebug" Interface2["INotifyPropertyChanged"]-.->Type Type["AvaloniaObject"] class Type type-node Type-->Derived0["AnimatorKeyFrame"] click Derived0 "/api/Avalonia.Animation/AnimatorKeyFrame" Type-->Derived1["DefinitionBase"] click Derived1 "/api/Avalonia.Controls/DefinitionBase" Type-->Derived2["PathSegment"] click Derived2 "/api/Avalonia.Media/PathSegment" Type-->Derived3["Drawing"] click Derived3 "/api/Avalonia.Media/Drawing" Type-->Derived4["KeyBinding"] click Derived4 "/api/Avalonia.Input/KeyBinding" Type-->Derived5["Animation"] click Derived5 "/api/Avalonia.Animation/Animation" Type-->Derived6["PathFigure"] click Derived6 "/api/Avalonia.Media/PathFigure" Type-->Derived7["Animatable"] click Derived7 "/api/Avalonia.Animation/Animatable" Type-->Derived8["DataGridColumn"] click Derived8 "/api/Avalonia.Controls/DataGridColumn" Type-->Derived9["Styles"] click Derived9 "/api/Avalonia.Styling/Styles" Type-->Derived10["Transition<T>"] click Derived10 "/api/Avalonia.Animation/Transition_1" Type-->Derived11["Style"] click Derived11 "/api/Avalonia.Styling/Style" Type-->Derived12["Geometry"] click Derived12 "/api/Avalonia.Media/Geometry" Type-->Derived13["GradientStop"] click Derived13 "/api/Avalonia.Media/GradientStop" Type-->Derived14["KeyFrame"] click Derived14 "/api/Avalonia.Animation/KeyFrame"

Syntax

public class AvaloniaObject : IAvaloniaObject, IAvaloniaObjectDebug, INotifyPropertyChanged

Remarks

This class is analogous to DependencyObject in WPF.

Constructors

Name Summary
AvaloniaObject() Initializes a new instance of the AvaloniaObject class.

Events

Name Type Summary
PropertyChanged EventHandler<AvaloniaPropertyChangedEventArgs>
Raised when a AvaloniaProperty value changes on this object.

Properties

Name Value Summary
InheritanceParent IAvaloniaObject
Gets or sets the parent object that inherited AvaloniaProperty values are inherited from.
this[AvaloniaProperty] object
Gets or sets the value of a AvaloniaProperty.
this[IndexerDescriptor] IBinding
Gets or sets a binding for a AvaloniaProperty.

Methods

Name Value Summary
AffectsValidation(AvaloniaProperty, AvaloniaProperty[]) void
Forces revalidation of properties when a property value changes.
static
Bind(AvaloniaProperty, IObservable<object>, BindingPriority) IDisposable
Binds a AvaloniaProperty to an observable.
Bind<T>(AvaloniaProperty<T>, IObservable<T>, BindingPriority) IDisposable
Binds a AvaloniaProperty to an observable.
CheckAccess() bool
ClearValue(AvaloniaProperty) void
Clears a AvaloniaProperty's local value.
GetValue(AvaloniaProperty) object
Gets a AvaloniaProperty value.
GetValue<T>(AvaloniaProperty<T>) T
Gets a AvaloniaProperty value.
IsAnimating(AvaloniaProperty) bool
Checks whether a AvaloniaProperty is animating.
IsSet(AvaloniaProperty) bool
Checks whether a AvaloniaProperty is set on this object.
OnPropertyChanged(AvaloniaPropertyChangedEventArgs) void
Called when a avalonia property changes on the object.
RaisePropertyChanged(AvaloniaProperty, object, object, BindingPriority) void
Raises the PropertyChanged event.
Revalidate(AvaloniaProperty) void
Forces the specified property to be revalidated.
SetAndRaise<T>(AvaloniaProperty<T>, T, AvaloniaObject.SetAndRaiseCallback<T>, T) bool
Sets the backing field for a direct avalonia property, raising the PropertyChanged event if the value has changed.
SetAndRaise<T>(AvaloniaProperty<T>, T, T) bool
Sets the backing field for a direct avalonia property, raising the PropertyChanged event if the value has changed.
SetValue(AvaloniaProperty, object, BindingPriority) void
Sets a AvaloniaProperty value.
SetValue<T>(AvaloniaProperty<T>, T, BindingPriority) void
Sets a AvaloniaProperty value.
UpdateDataValidation(AvaloniaProperty, BindingNotification) void
Called to update the validation state for properties for which data validation is enabled.
VerifyAccess() void

Extension Methods