System.Nullable<Align> AlignSelf { get; set; }

robot_2Generated
code_blocksInput

Description

The AlignSelf property in the BaseStyles class represents the align-self CSS property. This property allows the default alignment (or the one specified by AlignItems) to be overridden for individual flex items. It accepts values from the Align enumeration, which includes options such as Auto, FlexStart, FlexEnd, Center, Baseline, and Stretch.

Usage

To use the AlignSelf property, you can set it on an instance of a class that inherits from BaseStyles. This will affect how the specific element aligns itself within its flex container, overriding the container's AlignItems setting for that element.

Example

// Example of setting the AlignSelf property
var styles = new BaseStyles();
styles.AlignSelf = Align.Center; // Aligns the element to the center of the flex container

// To reset to default alignment
styles.AlignSelf = null; // This will use the container's AlignItems setting