Skip to main content

Class Button

Represents a clickable display button in the user interface.

Assembly: MicroLayout.dll​
View Source​
Declaration
public class Button : ClickableControl, IThemedControl, IClickableControl, IControl

Inheritance: System.Object -> Meadow.Foundation.Graphics.MicroLayout.Control

Implements:
Meadow.Foundation.Graphics.MicroLayout.IThemedControl

Properties​

ForeColor​

Gets or sets the foreground color of the button when not pressed.

View Source​
Declaration
public Color ForeColor { get; set; }

PressedColor​

Gets or sets the foreground color of the button when pressed.

View Source​
Declaration
public Color PressedColor { get; set; }

HighlightColor​

Gets or sets the highlight color of the button.

View Source​
Declaration
public Color HighlightColor { get; set; }

ShadowColor​

Gets or sets the shadow color of the button.

View Source​
Declaration
public Color ShadowColor { get; set; }

TextColor​

Gets or sets the text color of the button.

View Source​
Declaration
public Color TextColor { get; set; }

Text​

Gets or sets the text to be displayed on the button.

View Source​
Declaration
public string Text { get; set; }

Image​

Gets or sets the image to be displayed on the button.

View Source​
Declaration
public Image? Image { get; set; }

Font​

Gets or sets the font used for displaying the text on the button.

View Source​
Declaration
public IFont? Font { get; set; }

ScaleFactor​

ScaleFactor used to calculate drawn text size

View Source​
Declaration
public ScaleFactor ScaleFactor { get; set; }

Methods​

ApplyTheme(DisplayTheme)​

Applies the specified display theme to the display button.

View Source​
Declaration
public override void ApplyTheme(DisplayTheme theme)
Parameters​
TypeNameDescription
Meadow.Foundation.Graphics.MicroLayout.DisplayThemethemeThe display theme to apply.

OnDraw(MicroGraphics)​

Draws the display button on the specified Meadow.Foundation.Graphics.MicroGraphics surface.

View Source​
Declaration
protected override void OnDraw(MicroGraphics graphics)
Parameters​
TypeNameDescription
Meadow.Foundation.Graphics.MicroGraphics surface to draw the button on.

Implements​