Description
The TextDecorationThickness
property in the BaseStyles
class represents the text-decoration-thickness
CSS property. This property allows you to specify the thickness of text decorations such as underlines, overlines, and line-throughs. It is a nullable property of type Sandbox.UI.Length
, which means it can hold a length value or be set to null
if no specific thickness is desired.
Usage
To use the TextDecorationThickness
property, you can set it to a specific length value to define the thickness of text decorations. This can be useful for customizing the appearance of text in your UI elements. If you do not want to specify a thickness, you can set it to null
.
Example
// Example of setting the TextDecorationThickness property
var styles = new BaseStyles();
styles.TextDecorationThickness = new Length(2, LengthUnit.Pixel); // Set thickness to 2 pixels
// Example of resetting the TextDecorationThickness property
styles.TextDecorationThickness = null; // No specific thickness