Description
The FlexDirection.Column
field is a member of the FlexDirection
enumeration within the Sandbox.UI
namespace. It represents a layout direction where items are aligned from top to bottom, similar to a vertical stack. This is equivalent to the CSS flex-direction: column;
property.
Usage
Use FlexDirection.Column
when you want to arrange UI elements in a vertical column, starting from the top and stacking downwards. This is useful for creating vertical navigation menus, lists, or any UI component that requires a top-to-bottom flow.
Example
// Example of using FlexDirection.Column in a UI component
var panel = new Panel();
panel.Style.FlexDirection = FlexDirection.Column;
// Add child elements to the panel
var button1 = new Button("Button 1");
var button2 = new Button("Button 2");
panel.AddChild(button1);
panel.AddChild(button2);
// The buttons will be arranged in a vertical column within the panel.