Skip to main content
Version: 1.0.0-preview.34

Velaptor.UI.Button

Velaptor

Velaptor.UI

Button Class

A button that can be clicked to execute functionality.

public sealed class Button : Velaptor.UI.ControlBase

Inheritance System.ObjectControlBase → Button

Constructors

Button() Constructor

Initializes a new instance of the Button class.

public Button();

Button(Point, uint, uint, Label) Constructor

Initializes a new instance of the Button class.

public Button(System.Drawing.Point position, uint width, uint height, Velaptor.UI.Label? label);

Parameters

position System.Drawing.Point

The position of the button.

width System.UInt32

The width of the button.

height System.UInt32

The height of the button.

label Label

The label to display on the face of the button.

Button(Point, uint, uint) Constructor

Initializes a new instance of the Button class.

public Button(System.Drawing.Point position, uint width, uint height);

Parameters

position System.Drawing.Point

The position of the button.

width System.UInt32

The width of the button.

height System.UInt32

The height of the button.

Button(Point) Constructor

Initializes a new instance of the Button class.

public Button(System.Drawing.Point position);

Parameters

position System.Drawing.Point

The position of the button.

Button(uint, uint, Label) Constructor

Initializes a new instance of the Button class.

public Button(uint width, uint height, Velaptor.UI.Label? label);

Parameters

width System.UInt32

The width of the button.

height System.UInt32

The height of the button.

label Label

The label to display on the face of the button.

Button(uint, uint) Constructor

Initializes a new instance of the Button class.

public Button(uint width, uint height);

Parameters

width System.UInt32

The width of the button.

height System.UInt32

The height of the button.

Button(Label) Constructor

Initializes a new instance of the Button class.

public Button(Velaptor.UI.Label? label);

Parameters

label Label

The label to display on the face of the button.

Properties

AutoSize

Gets or sets a value indicating whether or not the size of the Button will be
managed automatically based on the size of the Label.

public bool AutoSize { get; set; }

Property Value

System.Boolean

Remarks

If AutoSize is false, the user can set the size to anything they
desire. If the size is less than the width or height of the text, then only the text characters
that are still within the bounds of the Label will be rendered.

BorderColor

Gets or sets the color of the Button border.

public System.Drawing.Color BorderColor { get; set; }

Property Value

System.Drawing.Color

BorderThickness

Gets or sets the thickness of the Button's border.

public uint BorderThickness { get; set; }

Property Value

System.UInt32

Remarks

This value uses pixels as unit of measure.

BorderVisible

Gets or sets a value indicating whether or not the border of the Button is visible.

public bool BorderVisible { get; set; }

Property Value

System.Boolean

CornerRadius

Gets or sets the radius values for each corner of the Button
border and face.

public Velaptor.Graphics.CornerRadius CornerRadius { get; set; }

Property Value

CornerRadius

Enabled

Gets or sets a value indicating whether or not the button is enabled.

public override bool Enabled { get; set; }

Implements Enabled

Property Value

System.Boolean

FaceColor

Gets or sets the color of the face of the Button.

public System.Drawing.Color FaceColor { get; set; }

Property Value

System.Drawing.Color

FontSize

Gets or sets the font size of the text on the face of the button.

public uint FontSize { get; set; }

Property Value

System.UInt32

Height

Gets or sets the Height of the Button.

public override uint Height { get; set; }

Implements Height

Property Value

System.UInt32

Remarks

If AutoSize is true, the Height value will be set but ignored
and the Height will be automatic based on the Height of the Text.

Label

Gets the Label of the Button.

public Velaptor.UI.Label? Label { get; set; }

Property Value

Label

Position

A user interface object that can be updated and rendered to the screen.

public override System.Drawing.Point Position { get; set; }

Implements Position

Property Value

System.Drawing.Point

Text

Gets or sets the text of the button.

public string Text { get; set; }

Property Value

System.String

Width

Gets or sets the Width of the Button.

public override uint Width { get; set; }

Implements Width

Property Value

System.UInt32

Remarks

If AutoSize is true, the Width value will be set but ignored
and the Width will be automatic based on the Width of the Text.

Methods

LoadContent()

Unloads the content for an object.

public override void LoadContent();

Implements LoadContent()

Render()

Renders the object.

public override void Render();

Implements Render()

UnloadContent()

Unloads the content for an object.

public override void UnloadContent();

Implements UnloadContent()