ILayoutable Interface

Summary

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

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.
EffectiveViewportChanged(EffectiveViewportChangedEventArgs) void
Used by the LayoutManager to notify the control that its effective viewport is changed.
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 ancestor.
FindAncestorOfType<T>(bool) T
Finds first ancestor of given type.
FindCommonVisualAncestor(IVisual) IVisual
Tries to get the first common ancestor of two visuals.
FindDescendantOfType<T>(bool) T
Finds first descendant of given type.
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.
GetVisualAt(Point, Func<IVisual, bool>) 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.
HitTestCustom(Point) bool
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.
TransformToVisual(IVisual) Matrix?
Returns a transform that transforms the visual's coordinates into the coordinates of the specified to.
TranslatePoint(Point, IVisual) Point?
Translates a point relative to this visual to coordinates that are relative to the specified visual.