Description
The WordSpacing
property in the BaseStyles
class represents the word-spacing
CSS property. This property is used to specify the spacing between words in a text element. It can be set to a specific length value, which can be a number with a unit (such as px
, em
, etc.), or it can be left as null
to use the default spacing.
Usage
To use the WordSpacing
property, you can assign it a value of type Sandbox.UI.Length
. This can be done in the context of a UI component where you want to adjust the spacing between words. For example, you might want to increase the word spacing for better readability or to achieve a specific design effect.
Example
// Example of setting the WordSpacing property
var styles = new BaseStyles();
styles.WordSpacing = new Length(5, LengthUnit.Pixel); // Sets word spacing to 5 pixels
// Resetting to default
styles.WordSpacing = null; // Uses default word spacing