WrapLayout Class

Summary

Arranges elements by wrapping them to fit the available space. When Orientation is set to Orientation.Horizontal, element are arranged in rows until the available width is reached and then to a new row. When Orientation is set to Orientation.Vertical, element are arranged in columns until the available height is reached.
Namespace
Avalonia.Layout
Interfaces
Base Types
graph BT Type-->Base0["VirtualizingLayout"] click Base0 "/api/Avalonia.Layout/VirtualizingLayout" Base0-->Base1["AttachedLayout"] click Base1 "/api/Avalonia.Layout/AttachedLayout" Base1-->Base2["AvaloniaObject"] click Base2 "/api/Avalonia/AvaloniaObject" Base2-->Base3["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["WrapLayout"] class Type type-node

Syntax

public class WrapLayout : VirtualizingLayout, IAvaloniaObject, IAvaloniaObjectDebug, 
    INotifyPropertyChanged, IValueSink

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

Fields

Name Constant Value Summary
HorizontalSpacingProperty
Identifies the HorizontalSpacing dependency property.
static
OrientationProperty
Identifies the Orientation dependency property.
static
VerticalSpacingProperty
Identifies the VerticalSpacing dependency property.
static

Properties

Name Value Summary
HorizontalSpacing double
Gets or sets a uniform Horizontal distance (in pixels) between items when Orientation is set to Horizontal, or between columns of items when Orientation is set to Vertical.
InheritanceParent IAvaloniaObject
Gets or sets the parent object that inherited AvaloniaProperty values are inherited from.
Inherited from AvaloniaObject
LayoutId string
Inherited from AttachedLayout
Orientation Orientation
Gets or sets the orientation of the WrapLayout. Horizontal means that child controls will be added horizontally until the width of the panel is reached, then a new row is added to add new child controls. Vertical means that children will be added vertically until the height of the panel is reached, then a new column is added.
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
VerticalSpacing double
Gets or sets a uniform Vertical distance (in pixels) between items when Orientation is set to Vertical, or between rows of items when Orientation is set to Horizontal.

Methods

Name Value Summary
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.
Inherited from AttachedLayout
BeginBatchUpdate() void
Inherited from AvaloniaObject
Bind<T>(DirectPropertyBase<T>, IObservable<BindingValue<T>>) IDisposable
Binds a AvaloniaProperty to an observable.
Inherited from AvaloniaObject
Bind<T>(StyledPropertyBase<T>, IObservable<BindingValue<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
ClearValue<T>(AvaloniaProperty<T>) void
Clears a AvaloniaProperty's local value.
Inherited from AvaloniaObject
ClearValue<T>(DirectPropertyBase<T>) void
Clears a AvaloniaProperty's local value.
Inherited from AvaloniaObject
ClearValue<T>(StyledPropertyBase<T>) void
Clears a AvaloniaProperty's local value.
Inherited from AvaloniaObject
CoerceValue<T>(StyledPropertyBase<T>) void
Coerces the specified AvaloniaProperty.
Inherited from AvaloniaObject
EndBatchUpdate() void
Inherited from AvaloniaObject
Equals(object) bool
Compares two objects using reference equality.
Inherited from AvaloniaObject
GetBaseValue<T>(StyledPropertyBase<T>, BindingPriority) Optional<T>
Gets an AvaloniaProperty base value.
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>(DirectPropertyBase<T>) T
Gets a AvaloniaProperty value.
Inherited from AvaloniaObject
GetValue<T>(StyledPropertyBase<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.
Inherited from AttachedLayout
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.
Inherited from AttachedLayout
OnItemsChanged(VirtualizingLayoutContext, object, NotifyCollectionChangedEventArgs) void
Notifies the layout when the data collection assigned to the container element (Items) has changed.
Inherited from VirtualizingLayout
OnPropertyChanged<T>(AvaloniaPropertyChangedEventArgs<T>) void
SetValue(AvaloniaProperty, object, BindingPriority) void
Sets a AvaloniaProperty value.
Inherited from AvaloniaObject
SetValue<T>(DirectPropertyBase<T>, T) void
Sets a AvaloniaProperty value.
Inherited from AvaloniaObject
SetValue<T>(StyledPropertyBase<T>, T, BindingPriority) IDisposable
Sets a AvaloniaProperty value.
Inherited from AvaloniaObject
UninitializeForContext(LayoutContext) void
Removes any state the layout previously stored on the ILayoutable container.
Inherited from AttachedLayout
VerifyAccess() void
Inherited from AvaloniaObject

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.