Class DockLayout
A layout that docks each child to an edge of the layout, in the order they were added. The space left over goes to the child that fills it.
public class DockLayout : LayoutControl, IUpdateable, IEquatable<IUpdateable>, IDrawable, IIdentifiable<Guid>, IEquatable<IDrawable>, IDisposable
- Inheritance
-
DockLayout
- Implements
- Inherited Members
Constructors
DockLayout(ILogger, View, string)
Creates a dock layout in view.
public DockLayout(ILogger logger, View view, string id = null)
Parameters
Properties
LastChildFill
Whether the last visible child takes the space left after the others are docked, whatever its edge. When false, it is docked to its own edge like the rest.
public bool LastChildFill { get; set; }
Property Value
Padding
The space kept clear inside the layout's edges, around the docked children.
public Spacing Padding { get; set; }
Property Value
Methods
AddChild(UIElement)
Adds child docked to Fill.
public override void AddChild(UIElement child)
Parameters
childUIElement
AddChild(UIElement, DockDirection)
Adds child docked to the edge dock.
public void AddChild(UIElement child, DockDirection dock)
Parameters
childUIElementdockDockDirection
ArrangeControls()
Places each visible child at its dock edge, in the order they were added.
protected override void ArrangeControls()
ClearChildren()
Removes every child and its dock setting.
public override void ClearChildren()
GetDesiredSize()
The size this layout asks for, from what its visible children need and the padding it keeps.
protected override Vector2 GetDesiredSize()
Returns
GetDock(UIElement)
Returns the edge child is docked to. Fill for
a child the layout does not hold.
public DockDirection GetDock(UIElement child)
Parameters
childUIElement
Returns
RemoveChild(UIElement)
Removes child and its dock setting.
public override void RemoveChild(UIElement child)
Parameters
childUIElement
SetDock(UIElement, DockDirection)
Docks child to the edge dock. Does nothing when the
child is not in this layout.
public void SetDock(UIElement child, DockDirection dock)
Parameters
childUIElementdockDockDirection