VirtualizingLayout Class

Summary

Represents the base class for an object that sizes and arranges child elements for a host and supports virtualization.
Namespace
Avalonia.Layout
Interfaces
Base Types
Derived Types
graph BT Type-->Base0["AttachedLayout"] click Base0 "/api/Avalonia.Layout/AttachedLayout" Base0-->Base1["AvaloniaObject"] click Base1 "/api/Avalonia/AvaloniaObject" Base1-->Base2["object"] Type-.->Interface0["IAvaloniaObject"] click Interface0 "/api/Avalonia/IAvaloniaObject" Type-.->Interface1["IAvaloniaObjectDebug"] click Interface1 "/api/Avalonia.Diagnostics/IAvaloniaObjectDebug" Type-.->Interface2["INotifyPropertyChanged"] Type["VirtualizingLayout"] class Type type-node Derived0["StackLayout"]-->Type click Derived0 "/api/Avalonia.Layout/StackLayout" Derived1["UniformGridLayout"]-->Type click Derived1 "/api/Avalonia.Layout/UniformGridLayout"

Syntax

public abstract class VirtualizingLayout : AttachedLayout, IAvaloniaObject, IAvaloniaObjectDebug, 
    INotifyPropertyChanged

Remarks

VirtualizingLayout is the base class for layouts that support virtualization. You can use one of the provided derived class, or inherit from it to create your own layout. Provided concrete virtualizing layout classes are StackLayout and UniformGridLayout.

Events

Name Type Summary
ArrangeInvalidated EventHandler
Occurs when the arrange state (layout) has been invalidated.
Inherited from AttachedLayout
MeasureInvalidated EventHandler
Occurs when the measurement state (layout) has been invalidated.
Inherited from AttachedLayout
PropertyChanged EventHandler<AvaloniaPropertyChangedEventArgs>
Raised when a AvaloniaProperty value changes on this object.
Inherited from AvaloniaObject

Properties

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

Methods

Name Value Summary
AffectsValidation(AvaloniaProperty, AvaloniaProperty[]) void
Forces revalidation of properties when a property value changes.
Inherited from AvaloniaObject
static
Arrange(LayoutContext, Size) Size
Positions child elements and determines a size for a container UIElement. Container elements that support attached layouts should call this method from their layout override implementations to form a recursive layout update.
ArrangeOverride(VirtualizingLayoutContext, Size) Size
When implemented in a derived class, provides the behavior for the "Arrange" pass of layout. Classes can override this method to define their own "Arrange" pass behavior.
Bind(AvaloniaProperty, IObservable<object>, BindingPriority) IDisposable
Binds a AvaloniaProperty to an observable.
Inherited from AvaloniaObject
Bind<T>(AvaloniaProperty<T>, IObservable<T>, BindingPriority) IDisposable
Binds a AvaloniaProperty to an observable.
Inherited from AvaloniaObject
CheckAccess() bool
Inherited from AvaloniaObject
ClearValue(AvaloniaProperty) void
Clears a AvaloniaProperty's local value.
Inherited from AvaloniaObject
Equals(object) bool
Compares two objects using reference equality.
Inherited from AvaloniaObject
GetHashCode() int
Gets the hash code for the object.
Inherited from AvaloniaObject
GetValue(AvaloniaProperty) object
Gets a AvaloniaProperty value.
Inherited from AvaloniaObject
GetValue<T>(AvaloniaProperty<T>) T
Gets a AvaloniaProperty value.
Inherited from AvaloniaObject
InitializeForContext(LayoutContext) void
Initializes any per-container state the layout requires when it is attached to an ILayoutable container.
InitializeForContextCore(VirtualizingLayoutContext) void
When overridden in a derived class, initializes any per-container state the layout requires when it is attached to an ILayoutable container.
InvalidateArrange() void
Invalidates the arrange state (layout) for all UIElement containers that reference this layout. After the invalidation, the UIElement will have its layout updated, which occurs asynchronously.
Inherited from AttachedLayout
InvalidateMeasure() void
Invalidates the measurement state (layout) for all ILayoutable containers that reference this layout.
Inherited from AttachedLayout
IsAnimating(AvaloniaProperty) bool
Checks whether a AvaloniaProperty is animating.
Inherited from AvaloniaObject
IsSet(AvaloniaProperty) bool
Checks whether a AvaloniaProperty is set on this object.
Inherited from AvaloniaObject
Measure(LayoutContext, Size) Size
Suggests a DesiredSize for a container element. A container element that supports attached layouts should call this method from their own MeasureOverride implementations to form a recursive layout update. The attached layout is expected to call the Measure for each of the container’s ILayoutable children.
MeasureOverride(VirtualizingLayoutContext, Size) Size
Provides the behavior for the "Measure" pass of the layout cycle. Classes can override this method to define their own "Measure" pass behavior.
OnItemsChanged(VirtualizingLayoutContext, object, NotifyCollectionChangedEventArgs) void
Notifies the layout when the data collection assigned to the container element (Items) has changed.
OnPropertyChanged(AvaloniaPropertyChangedEventArgs) void
Called when a avalonia property changes on the object.
Inherited from AvaloniaObject
Revalidate(AvaloniaProperty) void
Forces the specified property to be revalidated.
Inherited from AvaloniaObject
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.
Inherited from AvaloniaObject
SetValue(AvaloniaProperty, object, BindingPriority) void
Sets a AvaloniaProperty value.
Inherited from AvaloniaObject
SetValue<T>(AvaloniaProperty<T>, T, BindingPriority) void
Sets a AvaloniaProperty value.
Inherited from AvaloniaObject
UninitializeForContext(LayoutContext) void
Removes any state the layout previously stored on the ILayoutable container.
UninitializeForContextCore(VirtualizingLayoutContext) void
When overridden in a derived class, removes any state the layout previously stored on the ILayoutable container.
UpdateDataValidation(AvaloniaProperty, BindingNotification) void
Called to update the validation state for properties for which data validation is enabled.
Inherited from AvaloniaObject
VerifyAccess() void
Inherited from AvaloniaObject

Extension Methods