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-.->Interface3["IValueSink"] Type["AvaloniaObject"] class Type type-node Derived0["KeyBinding"]-->Type click Derived0 "/api/Avalonia.Input/KeyBinding" Derived1["Styles"]-->Type click Derived1 "/api/Avalonia.Styling/Styles" Derived2["Pen"]-->Type click Derived2 "/api/Avalonia.Media/Pen" Derived3["Style"]-->Type click Derived3 "/api/Avalonia.Styling/Style" Derived4["Transition<T>"]-->Type click Derived4 "/api/Avalonia.Animation/Transition_1" Derived5["ProgressBar.ProgressBarTemplateProperties"]-->Type click Derived5 "/api/Avalonia.Controls/ProgressBarTemplateProperties" Derived6["PathFigure"]-->Type click Derived6 "/api/Avalonia.Media/PathFigure" Derived7["Animation"]-->Type click Derived7 "/api/Avalonia.Animation/Animation" Derived8["Drawing"]-->Type click Derived8 "/api/Avalonia.Media/Drawing" Derived9["KeyFrame"]-->Type click Derived9 "/api/Avalonia.Animation/KeyFrame" Derived10["LayoutContext"]-->Type click Derived10 "/api/Avalonia.Layout/LayoutContext" Derived11["FlyoutBase"]-->Type click Derived11 "/api/Avalonia.Controls.Primitives/FlyoutBase" Derived12["Application"]-->Type click Derived12 "/api/Avalonia/Application" Derived13["CroppedBitmap"]-->Type click Derived13 "/api/Avalonia.Media.Imaging/CroppedBitmap" Derived14["TextDecoration"]-->Type click Derived14 "/api/Avalonia.Media/TextDecoration" Derived15["ExperimentalAcrylicMaterial"]-->Type click Derived15 "/api/Avalonia.Media/ExperimentalAcrylicMaterial" Derived16["PathSegment"]-->Type click Derived16 "/api/Avalonia.Media/PathSegment" Derived17["KeySpline"]-->Type click Derived17 "/api/Avalonia.Animation/KeySpline" Derived18["SplitViewTemplateSettings"]-->Type click Derived18 "/api/Avalonia.Controls/SplitViewTemplateSettings" Derived19["DefinitionBase"]-->Type click Derived19 "/api/Avalonia.Controls/DefinitionBase" Derived20["DrawingImage"]-->Type click Derived20 "/api/Avalonia.Media/DrawingImage" Derived21["AnimatorKeyFrame"]-->Type click Derived21 "/api/Avalonia.Animation/AnimatorKeyFrame" Derived22["NativeMenu"]-->Type click Derived22 "/api/Avalonia.Controls/NativeMenu" Derived23["DataGridColumn"]-->Type click Derived23 "/api/Avalonia.Controls/DataGridColumn" Derived24["Geometry"]-->Type click Derived24 "/api/Avalonia.Media/Geometry" Derived25["AttachedLayout"]-->Type click Derived25 "/api/Avalonia.Layout/AttachedLayout" Derived26["NativeMenuItemBase"]-->Type click Derived26 "/api/Avalonia.Controls/NativeMenuItemBase" Derived27["GradientStop"]-->Type click Derived27 "/api/Avalonia.Media/GradientStop" Derived28["Animatable"]-->Type click Derived28 "/api/Avalonia.Animation/Animatable"

Syntax

public class AvaloniaObject : IAvaloniaObject, IAvaloniaObjectDebug, INotifyPropertyChanged, 
    IValueSink

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
BeginBatchUpdate() void
Bind<T>(DirectPropertyBase<T>, IObservable<BindingValue<T>>) IDisposable
Binds a AvaloniaProperty to an observable.
Bind<T>(StyledPropertyBase<T>, IObservable<BindingValue<T>>, BindingPriority) IDisposable
Binds a AvaloniaProperty to an observable.
CheckAccess() bool
ClearValue(AvaloniaProperty) void
Clears a AvaloniaProperty's local value.
ClearValue<T>(AvaloniaProperty<T>) void
Clears a AvaloniaProperty's local value.
ClearValue<T>(DirectPropertyBase<T>) void
Clears a AvaloniaProperty's local value.
ClearValue<T>(StyledPropertyBase<T>) void
Clears a AvaloniaProperty's local value.
CoerceValue<T>(StyledPropertyBase<T>) void
Coerces the specified AvaloniaProperty.
EndBatchUpdate() void
Equals(object) bool
Compares two objects using reference equality.
GetBaseValue<T>(StyledPropertyBase<T>, BindingPriority) Optional<T>
Gets an AvaloniaProperty base value.
GetHashCode() int
Gets the hash code for the object.
GetValue(AvaloniaProperty) object
Gets a AvaloniaProperty value.
GetValue<T>(DirectPropertyBase<T>) T
Gets a AvaloniaProperty value.
GetValue<T>(StyledPropertyBase<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.
SetValue(AvaloniaProperty, object, BindingPriority) void
Sets a AvaloniaProperty value.
SetValue<T>(DirectPropertyBase<T>, T) void
Sets a AvaloniaProperty value.
SetValue<T>(StyledPropertyBase<T>, T, BindingPriority) IDisposable
Sets a AvaloniaProperty value.
VerifyAccess() void

Extension Methods

Name Value Summary
Bind(AvaloniaProperty, IObservable<BindingValue<object>>, BindingPriority) IDisposable
Binds a AvaloniaProperty to an observable.
Bind<T>(AvaloniaProperty<T>, IObservable<BindingValue<T>>, BindingPriority) IDisposable
Binds a AvaloniaProperty to an observable.
GetBindingObservable(AvaloniaProperty) IObservable<BindingValue<object>>
Gets an observable for a AvaloniaProperty.
GetBindingObservable<T>(AvaloniaProperty<T>) IObservable<BindingValue<T>>
Gets an observable for a AvaloniaProperty.
GetBindingSubject(AvaloniaProperty, BindingPriority) ISubject<BindingValue<object>>
Gets a subject for a AvaloniaProperty.
GetBindingSubject<T>(AvaloniaProperty<T>, BindingPriority) ISubject<BindingValue<T>>
Gets a subject for a AvaloniaProperty.
GetDiagnostic(AvaloniaProperty) AvaloniaPropertyValue
Gets a diagnostic for a AvaloniaProperty on a AvaloniaObject.
GetObservable(AvaloniaProperty) IObservable<object>
Gets an observable for a AvaloniaProperty.
GetObservable<T>(AvaloniaProperty<T>) IObservable<T>
Gets an observable for a AvaloniaProperty.
GetPropertyChangedObservable(AvaloniaProperty) IObservable<AvaloniaPropertyChangedEventArgs>
Gets an observable that listens for property changed events for an AvaloniaProperty.
GetSubject(AvaloniaProperty, BindingPriority) ISubject<object>
Gets a subject for a AvaloniaProperty.
GetSubject<T>(AvaloniaProperty<T>, BindingPriority) ISubject<T>
Gets a subject for a AvaloniaProperty.