Skip to main content
Version: 1.0.0-preview.34

Velaptor.UI.Label

Velaptor

Velaptor.UI

Label Class

A label that renders text on the screen.

public class Label : Velaptor.UI.ControlBase

Inheritance System.ObjectControlBase → Label

Constructors

Label() Constructor

Initializes a new instance of the Label class.

public Label();

Label(string) Constructor

Initializes a new instance of the Label class.

public Label(string text);

Parameters

text System.String

The text of the label.

Properties

AutoSize

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

public bool AutoSize { get; set; }

Property Value

System.Boolean

Remarks

If AutoSize is false, it means that the user can set the size to what they
want. 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.

CharacterBounds

Gets a list of all the bounds for each character of the Label.Text.

public System.Collections.Generic.IReadOnlyCollection<(char character,System.Drawing.RectangleF bounds)> CharacterBounds { get; }

Property Value

System.Collections.Generic.IReadOnlyCollection<<System.Char,System.Drawing.RectangleF>>

Color

Gets or sets the color of the text.

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

Property Value

System.Drawing.Color

FontFamilyName

Gets the font family name.

public string FontFamilyName { get; }

Property Value

System.String

FontSize

Gets or sets the font size.

public uint FontSize { get; set; }

Property Value

System.UInt32

Height

Gets or sets the height of the Label.

public override uint Height { get; set; }

Implements Height

Property Value

System.UInt32

Position

Gets or sets the position of the IControl on the screen.

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

Implements Position

Property Value

System.Drawing.Point

Style

Gets or sets the font style of the text.

public Velaptor.Content.Fonts.FontStyle Style { get; set; }

Property Value

FontStyle

Text

Gets or sets the labelText of the label.

public string Text { get; set; }

Property Value

System.String

Width

Gets or sets the width of the Label.

public override uint Width { get; set; }

Implements Width

Property Value

System.UInt32

Methods

LoadContent()

Unloads the content for an object.

public override void LoadContent();

Implements LoadContent()

Render()

Renders the Label.

public override void Render();

Implements Render()

UnloadContent()

Unloads the content for an object.

public override void UnloadContent();

Implements UnloadContent()