Skip to main content

Interface IControl

Represents a display control in the user interface.

Assembly: MicroLayout.dll
View Source
public interface IControl

Properties

Parent

Gets of sets the Control's Paretn, if it has one. If the Control is unparented (i.e. Parent is null) then it is directly on the DisplayScreen

View Source
IControl? Parent { get; set; }

Left

Gets or sets the left coordinate of the display control.

View Source
int Left { get; set; }

Top

Gets or sets the top coordinate of the display control.

View Source
int Top { get; set; }

IsVisible

Gets or sets whether the control is visible.

View Source
bool IsVisible { get; set; }

Width

Gets or sets the width of the display control.

View Source
int Width { get; set; }

Height

Gets or sets the height of the display control.

View Source
int Height { get; set; }

IsInvalid

Gets a value indicating whether the display control is currently invalid and needs to be refreshed.

View Source
bool IsInvalid { get; }

Methods

Refresh(MicroGraphics)

Refreshes the display control using the specified Meadow.Foundation.Graphics.MicroGraphics object.

View Source
void Refresh(MicroGraphics graphics)
Parameters
TypeNameDescription
Meadow.Foundation.Graphics.MicroGraphicsgraphicsThe Meadow.Foundation.Graphics.MicroGraphics object to use for refreshing the display control.

Invalidate()

Marks the display control as invalid and in need of refreshing.

View Source
void Invalidate()

Contains(int, int)

Checks if the specified coordinates are contained within the display control's area.

View Source
bool Contains(int x, int y)
Returns

System.Boolean: true if the coordinates are contained within the display control's area; otherwise, false.

Parameters
TypeNameDescription
System.Int32xThe x-coordinate to check.
System.Int32yThe y-coordinate to check.