Skip to Content
API ReferenceBorderRadius

BorderRadius

live Describes the corner radii of a rounded rectangle. Each corner radius is a non-negative value in logical pixels.

Constructor

BorderRadius

Creates a border radius with individual values for each corner.

ParameterDescription
topLeftRadius of the top-left corner.
topRightRadius of the top-right corner.
bottomRightRadius of the bottom-right corner.
bottomLeftRadius of the bottom-left corner.

Properties

BottomLeft

Radius of the bottom-left corner.

BottomRight

Radius of the bottom-right corner.

TopLeft

Radius of the top-left corner.

TopRight

Radius of the top-right corner.

Zero

Zero radius on all corners (sharp rectangle).

Methods

All

Creates a border radius with the same value on all four corners.

ParameterDescription
allThe radius applied to every corner.

Returns: An BorderRadius with equal values on all corners.

Equals

Equals

GetHashCode

Horizontal

Creates a border radius rounding only the left-side corners with one value and the right-side corners with another.

ParameterDescription
leftRadius applied to the top-left and bottom-left corners.
rightRadius applied to the top-right and bottom-right corners.

Returns: An BorderRadius with asymmetric left and right radii.

Only

Creates a border radius with individual values for each corner, all defaulting to zero. Use named arguments to set only the corners you need.

ParameterDescription
topLeftRadius of the top-left corner.
topRightRadius of the top-right corner.
bottomRightRadius of the bottom-right corner.
bottomLeftRadius of the bottom-left corner.

Returns: An BorderRadius with the specified corner values.

OnlyBottom

Creates a border radius with only the bottom corners rounded.

ParameterDescription
valueThe radius applied to the bottom-left and bottom-right corners.

Returns: An BorderRadius with only the bottom corners set.

OnlyTop

Creates a border radius with only the top corners rounded.

ParameterDescription
valueThe radius applied to the top-left and top-right corners.

Returns: An BorderRadius with only the top corners set.

ToString

Vertical

Creates a border radius rounding only the top corners with one value and the bottom corners with another.

ParameterDescription
topRadius applied to the top-left and top-right corners.
bottomRadius applied to the bottom-left and bottom-right corners.

Returns: An BorderRadius with asymmetric top and bottom radii.

Last updated on