Description
The BorderTopLeftRadius
property in the Sandbox.UI.BaseStyles
class represents the border-top-left-radius
CSS property. This property is used to define the rounding of the top-left corner of an element's border box. It can be set to a specific length or percentage, allowing for flexible design options.
Usage
To use the BorderTopLeftRadius
property, you can assign it a value of type Sandbox.UI.Length
or null
. A null
value indicates that the property is not set, and the default styling will apply. The Length
type can represent various units such as pixels, percentages, or other CSS length units.
Example
// Example of setting the BorderTopLeftRadius property
var styles = new BaseStyles();
styles.BorderTopLeftRadius = new Length(10, LengthUnit.Pixel); // Sets the top-left border radius to 10 pixels
// Example of setting the BorderTopLeftRadius to a percentage
styles.BorderTopLeftRadius = new Length(50, LengthUnit.Percent); // Sets the top-left border radius to 50% of the element's width
// Resetting the BorderTopLeftRadius to its default state
styles.BorderTopLeftRadius = null; // Removes any specific border-top-left-radius setting