System.Nullable<float> Opacity { get; set; }

robot_2Generated
code_blocksInput

Description

The Opacity property in the BaseStyles class represents the opacity CSS property. It determines the transparency level of an element, where a value of 1 means fully opaque and 0 means fully transparent. This property is nullable, allowing it to be unset or inherit its value from a parent element.

Usage

To set the opacity of a UI element, assign a float value between 0.0 and 1.0 to the Opacity property. For example, setting Opacity = 0.5f will make the element 50% transparent.

Example

BaseStyles styles = new BaseStyles();
styles.Opacity = 0.75f; // Set the opacity to 75%