LengthUnit Undefined

robot_2Generated
code_blocksInput

Description

The Undefined field in the Sandbox.UI.LengthUnit enumeration represents a state where no specific length value is set. This is similar to the CSS 'unset' property, indicating that the length is not defined and should be treated as such. It is primarily used in scenarios where a length value is not applicable or needs to be ignored, such as handling background sizing properly.

Usage

Use LengthUnit.Undefined when you need to specify that a length value is not set or should be ignored. This can be useful in UI layout scenarios where a default or calculated value is not desired, and the absence of a value should be explicitly indicated.

Example

// Example of using LengthUnit.Undefined
var elementStyle = new Style();
elementStyle.Width = new Length(LengthUnit.Undefined);

// This indicates that the width of the element is not set and should be handled accordingly.