Class LayoutBase
A base class for display layouts
Assembly: MicroLayout.dll
View Source
public abstract class LayoutBase : ThemedControl, ILayout, IThemedControl, IControlContainer, IControl
Inheritance: System.Object -> Meadow.Foundation.Graphics.MicroLayout.Control -> Meadow.Foundation.Graphics.MicroLayout.ThemedControl
Derived:
Meadow.Foundation.Graphics.MicroLayout.AbsoluteLayout, Meadow.Foundation.Graphics.MicroLayout.AlignmentLayout, Meadow.Foundation.Graphics.MicroLayout.GridLayout, Meadow.Foundation.Graphics.MicroLayout.ListBox, Meadow.Foundation.Graphics.MicroLayout.ScrollingTextArea, Meadow.Foundation.Graphics.MicroLayout.StackLayout
Implements:
Meadow.Foundation.Graphics.MicroLayout.ILayout, Meadow.Foundation.Graphics.MicroLayout.IThemedControl, Meadow.Foundation.Graphics.MicroLayout.IControlContainer, Meadow.Foundation.Graphics.MicroLayout.IControl
Properties
Controls
Gets the collection of controls on the display screen.
View Source
public virtual ControlsCollection Controls { get; }
IsVisible
Gets or sets a value indicating whether the control is visible.
View Source
public override bool IsVisible { get; set; }
BackgroundColor
Gets or sets the background color of the Layout.
View Source
public Color? BackgroundColor { get; set; }
IsInvalid
Gets or sets a value indicating whether the control needs to be redrawn.
View Source
public override bool IsInvalid { get; }
Methods
ApplyTheme(DisplayTheme)
Applies the specified display theme to the label display control.
View Source
public override void ApplyTheme(DisplayTheme theme)
Parameters
| Type | Name | Description |
|---|---|---|
| Meadow.Foundation.Graphics.MicroLayout.DisplayTheme | theme | The display theme to apply. |
Invalidate()
Marks the control as invalid, requiring a redraw.
View Source
public override void Invalidate()
OnDraw(MicroGraphics)
Performs the actual drawing of the control on the specified Meadow.Foundation.Graphics.MicroGraphics surface. This method must be implemented in derived classes.
View Source
protected override void OnDraw(MicroGraphics graphics)
Parameters
| Type | Name | Description |
|---|---|---|
| Meadow.Foundation.Graphics.MicroGraphics | graphics | The Meadow.Foundation.Graphics.MicroGraphics surface to draw the control on. |
OnParentBoundsChanged(object?, EventArgs)
Handles changes to the bounds of the parent control and triggers a layout update for the current control.
View Source
protected override void OnParentBoundsChanged(object? sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
System.Object | sender | The source of the event, typically the parent control. |
System.EventArgs | e | An System.EventArgs instance containing event data. |
OnChildrenCollectionChanged(object?, IControl)
View Source
protected virtual void OnChildrenCollectionChanged(object? sender, IControl control)
Parameters
| Type | Name |
|---|---|
System.Object | sender |
| Meadow.Foundation.Graphics.MicroLayout.IControl | control |