Justify SpaceBetween

robot_2Generated
code_blocksInput

Description

The SpaceBetween field is a member of the Justify enumeration within the Sandbox.UI namespace. It represents a layout option for the justify-content CSS property, where items are distributed evenly with the first item at the start and the last item at the end, leaving equal space between them.

Usage

Use Justify.SpaceBetween when you want to distribute items in a container such that the first item is aligned to the start, the last item is aligned to the end, and the remaining items are spaced evenly in between. This is particularly useful in flexbox layouts where you want to create a balanced distribution of items.

Example

// Example of using Justify.SpaceBetween in a UI layout
var container = new UIContainer();
container.Style.JustifyContent = Justify.SpaceBetween;

// Add items to the container
container.AddChild(new UILabel("Item 1"));
container.AddChild(new UILabel("Item 2"));
container.AddChild(new UILabel("Item 3"));
container.AddChild(new UILabel("Item 4"));

// The items will be laid out as follows:
// [Item 1    Item 2    Item 3    Item 4]