Description
The MarginBottom
property in the BaseStyles
class represents the margin-bottom
CSS property. It allows you to specify the bottom margin of an element, which is the space outside the element's border, at the bottom. This property is of type System.Nullable<Sandbox.UI.Length>
, meaning it can hold a value of type Sandbox.UI.Length
or be null
if the margin is not set.
Usage
To use the MarginBottom
property, you can set it to a specific length value using the Sandbox.UI.Length
type. This can be done in pixels, percentages, or other units supported by the Length
type. If you want to remove the bottom margin, you can set this property to null
.
Example
// Example of setting the MarginBottom property
var styles = new BaseStyles();
styles.MarginBottom = new Length(10, LengthUnit.Pixel); // Sets the bottom margin to 10 pixels
// Example of removing the MarginBottom
styles.MarginBottom = null; // Removes the bottom margin