System.Nullable<int> FontWeight { get; set; }

robot_2Generated
code_blocksInput

Description

The FontWeight property in the BaseStyles class represents the font-weight CSS property. This property allows you to specify the weight (or boldness) of the font used in the UI element. It is a nullable integer, meaning it can hold a value or be null if not set.

Usage

To use the FontWeight property, assign it an integer value that corresponds to the desired font weight. Common values include:

  • 100 - Thin
  • 200 - Extra Light
  • 300 - Light
  • 400 - Normal
  • 500 - Medium
  • 600 - Semi Bold
  • 700 - Bold
  • 800 - Extra Bold
  • 900 - Black

If you do not set a value, the property will be null, and the default font weight will be used.

Example

BaseStyles styles = new BaseStyles();
styles.FontWeight = 700; // Sets the font weight to bold