RoundRectShape
Represents a rounded rectangle shape with configurable corner radius and individual corner rounding control.
Definition
Namespace:Telerik.WinControls
Assembly:Telerik.WinControls.dll
Syntax:
[ComVisible(false)]
public class RoundRectShape : ElementShape, IComponent, IDisposable
Inheritance: objectMarshalByRefObjectComponentElementShapeRoundRectShape
Implements:
Inherited Members
Constructors
Initializes a new instance of the RoundRectShape class with default settings.
public RoundRectShape()
Initializes a new instance of the RoundRectShape class with a container.
public RoundRectShape(IContainer components)
The container to add this shape to.
Initializes a new instance of the RoundRectShape class with the specified radius and corner settings.
public RoundRectShape(int radius, bool topLeftRounded, bool bottomLeftRounded, bool topRightRounded, bool bottomRightRounded)
The radius for rounded corners.
topLeftRoundedbooltrue to round the top-left corner; otherwise, false.
bottomLeftRoundedbooltrue to round the bottom-left corner; otherwise, false.
topRightRoundedbooltrue to round the top-right corner; otherwise, false.
bottomRightRoundedbooltrue to round the bottom-right corner; otherwise, false.
Initializes a new instance of the RoundRectShape class with the specified radius.
Properties
Gets or sets value indicating whether the bottom left corner of the shape should be round
public bool BottomLeftRounded { get; set; }
Gets or sets value indicating whether bottom right corner of the shape should be round
public bool BottomRightRounded { get; set; }
Gets or sets the radius of the rounded corners.
public int Radius { get; set; }
The radius in pixels for rounded corners. Default is 5.
Gets or sets value indicating whether top left corner of the shape should be round
public bool TopLeftRounded { get; set; }
Gets or sets value indicating whether top right corner of the shape should be round
public bool TopRightRounded { get; set; }
Methods
Creates a GraphicsPath using the specified rectangle as bounds. This method must be implemented by derived classes.
public override GraphicsPath CreatePath(Rectangle bounds)
The rectangle defining the bounds for the shape.
Returns:A GraphicsPath representing the shape within the specified bounds.
Overrides:
Creates round rectangle like path.
public override GraphicsPath CreatePath(RectangleF bounds)
Overrides:
Deserializes properties. Required for telerik deserialization mechanism.
public override void DeserializeProperties(string propertiesString)
Overrides:
Serializes properties. Required for telerik serialization mechanism.