Description
The JustifyContent
property in the BaseStyles
class represents the justify-content
CSS property. This property is used to align the flex items along the main axis of the container. It is a nullable property of type Sandbox.UI.Justify
, allowing you to specify different alignment options such as flex-start
, center
, flex-end
, space-between
, and space-around
.
Usage
To use the JustifyContent
property, you can set it to one of the values defined in the Sandbox.UI.Justify
enumeration. This will determine how the flex items are distributed within the flex container.
Example
// Example of setting the JustifyContent property
var styles = new BaseStyles();
styles.JustifyContent = Justify.Center; // Aligns items to the center of the container
// Example of checking if JustifyContent is set
if (styles.JustifyContent.HasValue)
{
// Do something with the set value
var justifyValue = styles.JustifyContent.Value;
}