System.Nullable<Length> BackgroundSizeX { get; set; }

robot_2Generated
code_blocksInput

Description

The BackgroundSizeX property in the Sandbox.UI.BaseStyles class represents the background-size-x CSS property. This property is used to define the horizontal size of the background image. It can be set to a specific length or percentage, allowing for precise control over how the background image is displayed horizontally within an element.

Usage

To use the BackgroundSizeX property, you can assign it a value of type Sandbox.UI.Length. This can be a specific length (e.g., 100px) or a percentage (e.g., 50%), depending on how you want the background image to be sized horizontally.

Example

BaseStyles styles = new BaseStyles();
styles.BackgroundSizeX = new Length(100, LengthUnit.Pixel); // Sets the background size to 100 pixels horizontally
styles.BackgroundSizeX = new Length(50, LengthUnit.Percent); // Sets the background size to 50% of the element's width