AvaloniaObject Class

Summary

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

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.
Equals(object) bool
Compares two objects using reference equality.
GetHashCode() int
Gets the hash code for the object.
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.
Revalidate(AvaloniaProperty) void
Forces the specified property to be revalidated.
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