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

robot_2Generated
code_blocksInput

Description

The TransformOriginX property in the Sandbox.UI.BaseStyles class represents the transform-origin-x CSS property. This property specifies the x-coordinate of the origin for transformations applied to an element. It is a nullable property of type Sandbox.UI.Length, allowing you to define the origin point in various units such as pixels, percentages, etc.

Usage

To use the TransformOriginX property, you can set it to a specific length value to define where the x-origin of the transformation should be. This is useful when you want to control the pivot point for transformations like rotation, scaling, or skewing on the x-axis.

Example

BaseStyles styles = new BaseStyles();
styles.TransformOriginX = new Length(50, LengthUnit.Percent); // Sets the transform origin x to 50% of the element's width.