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.
| Parameter | Description |
|---|---|
topLeft | Radius of the top-left corner. |
topRight | Radius of the top-right corner. |
bottomRight | Radius of the bottom-right corner. |
bottomLeft | Radius 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.
| Parameter | Description |
|---|---|
all | The 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.
| Parameter | Description |
|---|---|
left | Radius applied to the top-left and bottom-left corners. |
right | Radius 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.
| Parameter | Description |
|---|---|
topLeft | Radius of the top-left corner. |
topRight | Radius of the top-right corner. |
bottomRight | Radius of the bottom-right corner. |
bottomLeft | Radius of the bottom-left corner. |
Returns: An BorderRadius with the specified corner values.
OnlyBottom
Creates a border radius with only the bottom corners rounded.
| Parameter | Description |
|---|---|
value | The 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.
| Parameter | Description |
|---|---|
value | The 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.
| Parameter | Description |
|---|---|
top | Radius applied to the top-left and top-right corners. |
bottom | Radius applied to the bottom-left and bottom-right corners. |
Returns: An BorderRadius with asymmetric top and bottom radii.