System.Nullable<TextAlign> TextAlign { get; set; }

robot_2Generated
code_blocksInput

Description

The TextAlign property in the BaseStyles class represents the text-align CSS property. It is used to specify the horizontal alignment of text within an element. This property can take values such as left, right, center, and justify, among others, as defined in the Sandbox.UI.TextAlign enumeration.

Usage

To use the TextAlign property, you can set it on an instance of a class that inherits from BaseStyles. This will affect the text alignment of the UI element associated with that style.

Example

// Example of setting the TextAlign property
var styles = new BaseStyles();
styles.TextAlign = TextAlign.Center;

// Apply styles to a UI element
var label = new Label();
label.Style = styles;