ILayoutable Interface

Summary

Defines layout-related functionality for a control.
Namespace
Avalonia.Layout
Interfaces
Implementing Types
graph TD Interface0["IVisual"]-.->Type click Interface0 "/api/Avalonia.VisualTree/IVisual" Type["ILayoutable"] class Type type-node Type-.->Implementing0["ReactiveWindow<TViewModel>"] click Implementing0 "/api/Avalonia/ReactiveWindow_1" Type-.->Implementing1["TabStrip"] click Implementing1 "/api/Avalonia.Controls.Primitives/TabStrip" Type-.->Implementing2["RangeBase"] click Implementing2 "/api/Avalonia.Controls.Primitives/RangeBase" Type-.->Implementing3["Panel"] click Implementing3 "/api/Avalonia.Controls/Panel" Type-.->Implementing4["ReactiveUserControl<TViewModel>"] click Implementing4 "/api/Avalonia/ReactiveUserControl_1" Type-.->Implementing5["IContentControl"] click Implementing5 "/api/Avalonia.Controls/IContentControl" Type-.->Implementing6["ItemsPresenter"] click Implementing6 "/api/Avalonia.Controls.Presenters/ItemsPresenter" Type-.->Implementing7["Layoutable"] click Implementing7 "/api/Avalonia.Layout/Layoutable" Type-.->Implementing8["DataGridCellsPresenter"] click Implementing8 "/api/Avalonia.Controls.Primitives/DataGridCellsPresenter" Type-.->Implementing9["UserControl"] click Implementing9 "/api/Avalonia.Controls/UserControl" Type-.->Implementing10["RemoteWidget"] click Implementing10 "/api/Avalonia.Controls.Remote/RemoteWidget" Type-.->Implementing11["Border"] click Implementing11 "/api/Avalonia.Controls/Border" Type-.->Implementing12["DevTools"] click Implementing12 "/api/Avalonia.Diagnostics/DevTools" Type-.->Implementing13["TreeView"] click Implementing13 "/api/Avalonia.Controls/TreeView" Type-.->Implementing14["TabStripItem"] click Implementing14 "/api/Avalonia.Controls.Primitives/TabStripItem" Type-.->Implementing15["ProgressBar"] click Implementing15 "/api/Avalonia.Controls/ProgressBar" Type-.->Implementing16["DataGridRowsPresenter"] click Implementing16 "/api/Avalonia.Controls.Primitives/DataGridRowsPresenter" Type-.->Implementing17["ToggleButton"] click Implementing17 "/api/Avalonia.Controls.Primitives/ToggleButton" Type-.->Implementing18["IPresenter"] click Implementing18 "/api/Avalonia.Controls.Presenters/IPresenter" Type-.->Implementing19["DataGridRowGroupHeader"] click Implementing19 "/api/Avalonia.Controls/DataGridRowGroupHeader" Type-.->Implementing20["MenuItem"] click Implementing20 "/api/Avalonia.Controls/MenuItem" Type-.->Implementing21["IEmbeddedLayoutRoot"] click Implementing21 "/api/Avalonia.Layout/IEmbeddedLayoutRoot" Type-.->Implementing22["WindowBase"] click Implementing22 "/api/Avalonia.Controls/WindowBase" Type-.->Implementing23["IPanel"] click Implementing23 "/api/Avalonia.Controls/IPanel" Type-.->Implementing24["Canvas"] click Implementing24 "/api/Avalonia.Controls/Canvas" Type-.->Implementing25["ScrollBar"] click Implementing25 "/api/Avalonia.Controls.Primitives/ScrollBar" Type-.->Implementing26["CalendarDayButton"] click Implementing26 "/api/Avalonia.Controls.Primitives/CalendarDayButton" Type-.->Implementing27["ContentPresenter"] click Implementing27 "/api/Avalonia.Controls.Presenters/ContentPresenter" Type-.->Implementing28["Separator"] click Implementing28 "/api/Avalonia.Controls/Separator" Type-.->Implementing29["ContentControl"] click Implementing29 "/api/Avalonia.Controls/ContentControl" Type-.->Implementing30["Track"] click Implementing30 "/api/Avalonia.Controls.Primitives/Track" Type-.->Implementing31["TextBox"] click Implementing31 "/api/Avalonia.Controls/TextBox" Type-.->Implementing32["DropDown"] click Implementing32 "/api/Avalonia.Controls/DropDown" Type-.->Implementing33["DataValidationErrors"] click Implementing33 "/api/Avalonia.Controls/DataValidationErrors" Type-.->Implementing34["SimpleGrid"] click Implementing34 "/api/Avalonia.Diagnostics.Views/SimpleGrid" Type-.->Implementing35["Carousel"] click Implementing35 "/api/Avalonia.Controls/Carousel" Type-.->Implementing36["PopupRoot"] click Implementing36 "/api/Avalonia.Controls.Primitives/PopupRoot" Type-.->Implementing37["Decorator"] click Implementing37 "/api/Avalonia.Controls/Decorator" Type-.->Implementing38["DataGridDetailsPresenter"] click Implementing38 "/api/Avalonia.Controls.Primitives/DataGridDetailsPresenter" Type-.->Implementing39["IContentPresenter"] click Implementing39 "/api/Avalonia.Controls.Presenters/IContentPresenter" Type-.->Implementing40["Thumb"] click Implementing40 "/api/Avalonia.Controls.Primitives/Thumb" Type-.->Implementing41["EventsView"] click Implementing41 "/api/Avalonia.Diagnostics.Views/EventsView" Type-.->Implementing42["NumericUpDown"] click Implementing42 "/api/Avalonia.Controls/NumericUpDown" Type-.->Implementing43["DatePicker"] click Implementing43 "/api/Avalonia.Controls/DatePicker" Type-.->Implementing44["TextBlock"] click Implementing44 "/api/Avalonia.Controls/TextBlock" Type-.->Implementing45["Grid"] click Implementing45 "/api/Avalonia.Controls/Grid" Type-.->Implementing46["ComboBoxItem"] click Implementing46 "/api/Avalonia.Controls/ComboBoxItem" Type-.->Implementing47["Ellipse"] click Implementing47 "/api/Avalonia.Controls.Shapes/Ellipse" Type-.->Implementing48["ContextMenu"] click Implementing48 "/api/Avalonia.Controls/ContextMenu" Type-.->Implementing49["ScrollContentPresenter"] click Implementing49 "/api/Avalonia.Controls.Presenters/ScrollContentPresenter" Type-.->Implementing50["DockPanel"] click Implementing50 "/api/Avalonia.Controls/DockPanel" Type-.->Implementing51["Interactive"] click Implementing51 "/api/Avalonia.Interactivity/Interactive" Type-.->Implementing52["TabControl"] click Implementing52 "/api/Avalonia.Controls/TabControl" Type-.->Implementing53["VirtualizingStackPanel"] click Implementing53 "/api/Avalonia.Controls/VirtualizingStackPanel" Type-.->Implementing54["WrapPanel"] click Implementing54 "/api/Avalonia.Controls/WrapPanel" Type-.->Implementing55["InputElement"] click Implementing55 "/api/Avalonia.Input/InputElement" Type-.->Implementing56["StackPanel"] click Implementing56 "/api/Avalonia.Controls/StackPanel" Type-.->Implementing57["HeaderedItemsControl"] click Implementing57 "/api/Avalonia.Controls.Primitives/HeaderedItemsControl" Type-.->Implementing58["CheckBox"] click Implementing58 "/api/Avalonia.Controls/CheckBox" Type-.->Implementing59["ListBoxItem"] click Implementing59 "/api/Avalonia.Controls/ListBoxItem" Type-.->Implementing60["TreePageView"] click Implementing60 "/api/Avalonia.Diagnostics.Views/TreePageView" Type-.->Implementing61["Menu"] click Implementing61 "/api/Avalonia.Controls/Menu" Type-.->Implementing62["RepeatButton"] click Implementing62 "/api/Avalonia.Controls/RepeatButton" Type-.->Implementing63["GridSplitter"] click Implementing63 "/api/Avalonia.Controls/GridSplitter" Type-.->Implementing64["AdornerDecorator"] click Implementing64 "/api/Avalonia.Controls.Primitives/AdornerDecorator" Type-.->Implementing65["ToolTip"] click Implementing65 "/api/Avalonia.Controls/ToolTip" Type-.->Implementing66["RoutedViewHost"] click Implementing66 "/api/Avalonia/RoutedViewHost" Type-.->Implementing67["Polygon"] click Implementing67 "/api/Avalonia.Controls.Shapes/Polygon" Type-.->Implementing68["LayoutTransformControl"] click Implementing68 "/api/Avalonia.Controls/LayoutTransformControl" Type-.->Implementing69["Expander"] click Implementing69 "/api/Avalonia.Controls/Expander" Type-.->Implementing70["SelectingItemsControl"] click Implementing70 "/api/Avalonia.Controls.Primitives/SelectingItemsControl" Type-.->Implementing71["MenuBase"] click Implementing71 "/api/Avalonia.Controls/MenuBase" Type-.->Implementing72["Viewbox"] click Implementing72 "/api/Avalonia.Controls/Viewbox" Type-.->Implementing73["TreeViewItem"] click Implementing73 "/api/Avalonia.Controls/TreeViewItem" Type-.->Implementing74["IControl"] click Implementing74 "/api/Avalonia.Controls/IControl" Type-.->Implementing75["ItemsPresenterBase"] click Implementing75 "/api/Avalonia.Controls.Presenters/ItemsPresenterBase" Type-.->Implementing76["AutoCompleteBox"] click Implementing76 "/api/Avalonia.Controls/AutoCompleteBox" Type-.->Implementing77["Path"] click Implementing77 "/api/Avalonia.Controls.Shapes/Path" Type-.->Implementing78["DataGrid"] click Implementing78 "/api/Avalonia.Controls/DataGrid" Type-.->Implementing79["ItemsControl"] click Implementing79 "/api/Avalonia.Controls/ItemsControl" Type-.->Implementing80["Button"] click Implementing80 "/api/Avalonia.Controls/Button" Type-.->Implementing81["TextPresenter"] click Implementing81 "/api/Avalonia.Controls.Presenters/TextPresenter" Type-.->Implementing82["AutoCompleteBox.BindingEvaluator<T>"] click Implementing82 "/api/Avalonia.Controls/BindingEvaluator_1" Type-.->Implementing83["Window"] click Implementing83 "/api/Avalonia.Controls/Window" Type-.->Implementing84["ButtonSpinner"] click Implementing84 "/api/Avalonia.Controls/ButtonSpinner" Type-.->Implementing85["CalendarItem"] click Implementing85 "/api/Avalonia.Controls.Primitives/CalendarItem" Type-.->Implementing86["IMenu"] click Implementing86 "/api/Avalonia.Controls/IMenu" Type-.->Implementing87["DropDownItem"] click Implementing87 "/api/Avalonia.Controls/DropDownItem" Type-.->Implementing88["AccessText"] click Implementing88 "/api/Avalonia.Controls.Primitives/AccessText" Type-.->Implementing89["IMenuElement"] click Implementing89 "/api/Avalonia.Controls/IMenuElement" Type-.->Implementing90["ILayoutRoot"] click Implementing90 "/api/Avalonia.Layout/ILayoutRoot" Type-.->Implementing91["UniformGrid"] click Implementing91 "/api/Avalonia.Controls.Primitives/UniformGrid" Type-.->Implementing92["CalendarButton"] click Implementing92 "/api/Avalonia.Controls.Primitives/CalendarButton" Type-.->Implementing93["ScrollViewer"] click Implementing93 "/api/Avalonia.Controls/ScrollViewer" Type-.->Implementing94["TopLevel"] click Implementing94 "/api/Avalonia.Controls/TopLevel" Type-.->Implementing95["DrawingPresenter"] click Implementing95 "/api/Avalonia.Controls/DrawingPresenter" Type-.->Implementing96["AdornerLayer"] click Implementing96 "/api/Avalonia.Controls.Primitives/AdornerLayer" Type-.->Implementing97["Spinner"] click Implementing97 "/api/Avalonia.Controls/Spinner" Type-.->Implementing98["DataGridRowHeader"] click Implementing98 "/api/Avalonia.Controls.Primitives/DataGridRowHeader" Type-.->Implementing99["HeaderedContentControl"] click Implementing99 "/api/Avalonia.Controls.Primitives/HeaderedContentControl" Type-.->Implementing100["Slider"] click Implementing100 "/api/Avalonia.Controls/Slider" Type-.->Implementing101["Calendar"] click Implementing101 "/api/Avalonia.Controls/Calendar" Type-.->Implementing102["DataGridColumnHeader"] click Implementing102 "/api/Avalonia.Controls/DataGridColumnHeader" Type-.->Implementing103["EmbeddableControlRoot"] click Implementing103 "/api/Avalonia.Controls.Embedding/EmbeddableControlRoot" Type-.->Implementing104["ListBox"] click Implementing104 "/api/Avalonia.Controls/ListBox" Type-.->Implementing105["DataGridRow"] click Implementing105 "/api/Avalonia.Controls/DataGridRow" Type-.->Implementing106["Polyline"] click Implementing106 "/api/Avalonia.Controls.Shapes/Polyline" Type-.->Implementing107["Rectangle"] click Implementing107 "/api/Avalonia.Controls.Shapes/Rectangle" Type-.->Implementing108["DataGridCell"] click Implementing108 "/api/Avalonia.Controls/DataGridCell" Type-.->Implementing109["Line"] click Implementing109 "/api/Avalonia.Controls.Shapes/Line" Type-.->Implementing110["IVirtualizingPanel"] click Implementing110 "/api/Avalonia.Controls/IVirtualizingPanel" Type-.->Implementing111["DataGridFrozenGrid"] click Implementing111 "/api/Avalonia.Controls.Primitives/DataGridFrozenGrid" Type-.->Implementing112["Shape"] click Implementing112 "/api/Avalonia.Controls.Shapes/Shape" Type-.->Implementing113["Image"] click Implementing113 "/api/Avalonia.Controls/Image" Type-.->Implementing114["Control"] click Implementing114 "/api/Avalonia.Controls/Control" Type-.->Implementing115["CarouselPresenter"] click Implementing115 "/api/Avalonia.Controls.Presenters/CarouselPresenter" Type-.->Implementing116["TabItem"] click Implementing116 "/api/Avalonia.Controls/TabItem" Type-.->Implementing117["HeaderedSelectingItemsControl"] click Implementing117 "/api/Avalonia.Controls.Primitives/HeaderedSelectingItemsControl" Type-.->Implementing118["ComboBox"] click Implementing118 "/api/Avalonia.Controls/ComboBox" Type-.->Implementing119["IItemsPresenter"] click Implementing119 "/api/Avalonia.Controls.Presenters/IItemsPresenter" Type-.->Implementing120["DataGridColumnHeadersPresenter"] click Implementing120 "/api/Avalonia.Controls.Primitives/DataGridColumnHeadersPresenter" Type-.->Implementing121["IMenuItem"] click Implementing121 "/api/Avalonia.Controls/IMenuItem" Type-.->Implementing122["TemplatedControl"] click Implementing122 "/api/Avalonia.Controls.Primitives/TemplatedControl" Type-.->Implementing123["Popup"] click Implementing123 "/api/Avalonia.Controls.Primitives/Popup" Type-.->Implementing124["RadioButton"] click Implementing124 "/api/Avalonia.Controls/RadioButton"

Syntax

public interface ILayoutable : IVisual

Properties

Name Value Summary
DesiredSize Size
Gets the size that this element computed during the measure pass of the layout process.
Height double
Gets the height of the element.
HorizontalAlignment HorizontalAlignment
Gets the element's preferred horizontal alignment in its parent.
IsArrangeValid bool
Gets a value indicating whether the control's layouts arrange is valid.
IsMeasureValid bool
Gets a value indicating whether the control's layout measure is valid.
Margin Thickness
Gets the margin around the element.
MaxHeight double
Gets the maximum height of the element.
MaxWidth double
Gets the maximum width of the element.
MinHeight double
Gets the minimum height of the element.
MinWidth double
Gets the minimum width of the element.
PreviousArrange Rect?
Gets the layout rect passed in the previous layout pass, if any.
PreviousMeasure Size?
Gets the available size passed in the previous layout pass, if any.
VerticalAlignment VerticalAlignment
Gets the element's preferred vertical alignment in its parent.
Width double
Gets the width of the element.

Methods

Name Value Summary
ApplyTemplate() void
Creates the visual children of the control, if necessary
Arrange(Rect) void
Arranges the control and its children.
ChildDesiredSizeChanged(ILayoutable) void
Called when a child control's desired size changes.
InvalidateArrange() void
Invalidates the arrangement of the control and queues a new layout pass.
InvalidateMeasure() void
Invalidates the measurement of the control and queues a new layout pass.
Measure(Size) void
Carries out a measure of the control.

Extension Methods

Name Value Summary
CalculateDistanceFromAncestor(IVisual) int
Calculates the distance from a visual's IRenderRoot.
FindCommonVisualAncestor(IVisual) IVisual
Tries to get the first common ancestor of two visuals.
GetSelfAndVisualAncestors() IEnumerable<IVisual>
Enumerates an IVisual and its ancestors in the visual tree.
GetSelfAndVisualDescendants() IEnumerable<IVisual>
Enumerates an IVisual and its descendants in the visual tree.
GetVisualAncestors() IEnumerable<IVisual>
Enumerates the ancestors of an IVisual in the visual tree.
GetVisualAt(Point) IVisual
Gets the first visual in the visual tree whose bounds contain a point.
GetVisualChildren() IEnumerable<IVisual>
Enumerates the children of an IVisual in the visual tree.
GetVisualDescendants() IEnumerable<IVisual>
Enumerates the descendants of an IVisual in the visual tree.
GetVisualParent() IVisual
Gets the visual parent of an IVisual.
GetVisualParent<T>() T
Gets the visual parent of an IVisual.
GetVisualRoot() IRenderRoot
Gets the root visual for an IVisual.
GetVisualsAt(Point) IEnumerable<IVisual>
Enumerates the visible visuals in the visual tree whose bounds contain a point.
GetVisualsAt(Point, Func<IVisual, bool>) IEnumerable<IVisual>
Enumerates the visuals in the visual tree whose bounds contain a point.
IsVisualAncestorOf(IVisual) bool
Tests whether an IVisual is an ancestor of another visual.
PointToClient(PixelPoint) Point
Converts a point from screen to client coordinates.
PointToScreen(Point) PixelPoint
Converts a point from client to screen coordinates.
TranslatePoint(Point, IVisual) Point
Translates a point relative to this visual to coordinates that are relative to the specified visual. The visual and relativeTo should be descendants of the same root window