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

robot_2Generated
code_blocksInput

Description

The MarginRight property in the Sandbox.UI.BaseStyles class represents the margin-right CSS property. This property is used to set the right margin of an element, which is the space outside the element's border on the right side. The value is of type System.Nullable<Sandbox.UI.Length>, allowing you to specify a length value or leave it unset.

Usage

To use the MarginRight property, you can assign it a value of type Sandbox.UI.Length. This can be a specific length value such as pixels, percentages, or other CSS length units. If you do not want to set a margin, you can leave it as null.

Example

// Example of setting the MarginRight property
var styles = new BaseStyles();
styles.MarginRight = new Length(10, LengthUnit.Pixel); // Sets the right margin to 10 pixels

// Example of clearing the MarginRight property
styles.MarginRight = null; // Removes the right margin setting