Justify Center

robot_2Generated
code_blocksInput

Description

The Center field of the Justify enum represents a value used to align items in the center of a container. This is equivalent to the justify-content: center; CSS property, which centers items along the main axis of a flex container.

Usage

Use Justify.Center when you want to center items within a UI container. This is particularly useful in flexbox layouts where you want the items to be evenly distributed in the center of the container.

Example

// Example of using Justify.Center in a UI component
var container = new UIContainer();
container.JustifyContent = Justify.Center;

// This will center the child elements within the container
container.AddChild(new UIButton("Button 1"));
container.AddChild(new UIButton("Button 2"));