Class
RoundRectShape

Represents a rounded rectangle shape with configurable corner radius and individual corner rounding control.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

cs-api-definition
[ComVisible(false)]
public class RoundRectShape : ElementShape, IComponent, IDisposable

Inheritance: objectMarshalByRefObjectComponentElementShapeRoundRectShape

Implements: IComponentIDisposable

Inherited Members ElementShape.GetElementShape(RadElement)ElementShape.GetElementContour(RadElement)ElementShape.GetElementContour(Rectangle)ElementShape.GetBounds(RadElement)ElementShape.CreateContour(Rectangle)ElementShape.MirrorPath(GraphicsPath, RectangleF)ElementShape.Dispose(bool)ElementShape.IsRightToLeftComponent.Dispose()Component.GetService(Type)Component.ToString()Component.CanRaiseEventsComponent.EventsComponent.SiteComponent.ContainerComponent.DesignModeComponent.DisposedMarshalByRefObject.MemberwiseClone(bool)MarshalByRefObject.GetLifetimeService()MarshalByRefObject.InitializeLifetimeService()MarshalByRefObject.CreateObjRef(Type)

Constructors

RoundRectShape()

Initializes a new instance of the RoundRectShape class with default settings.

Declaration

cs-api-definition
public RoundRectShape()

RoundRectShape(IContainer)

Initializes a new instance of the RoundRectShape class with a container.

Declaration

cs-api-definition
public RoundRectShape(IContainer components)

Parameters

components

IContainer

The container to add this shape to.

RoundRectShape(int)

Initializes a new instance of the RoundRectShape class with the specified radius.

Declaration

cs-api-definition
public RoundRectShape(int radius)

Parameters

radius

int

The radius for all rounded corners.

RoundRectShape(int, bool, bool, bool, bool)

Initializes a new instance of the RoundRectShape class with the specified radius and corner settings.

Declaration

cs-api-definition
public RoundRectShape(int radius, bool topLeftRounded, bool bottomLeftRounded, bool topRightRounded, bool bottomRightRounded)

Parameters

radius

int

The radius for rounded corners.

topLeftRounded

bool

true to round the top-left corner; otherwise, false.

bottomLeftRounded

bool

true to round the bottom-left corner; otherwise, false.

topRightRounded

bool

true to round the top-right corner; otherwise, false.

bottomRightRounded

bool

true to round the bottom-right corner; otherwise, false.

Properties

BottomLeftRounded

Gets or sets value indicating whether the bottom left corner of the shape should be round

Declaration

cs-api-definition
public bool BottomLeftRounded { get; set; }

Property Value

bool

BottomRightRounded

Gets or sets value indicating whether bottom right corner of the shape should be round

Declaration

cs-api-definition
public bool BottomRightRounded { get; set; }

Property Value

bool

Radius

Gets or sets the radius of the rounded corners.

Declaration

cs-api-definition
public int Radius { get; set; }

Property Value

int

The radius in pixels for rounded corners. Default is 5.

TopLeftRounded

Gets or sets value indicating whether top left corner of the shape should be round

Declaration

cs-api-definition
public bool TopLeftRounded { get; set; }

Property Value

bool

TopRightRounded

Gets or sets value indicating whether top right corner of the shape should be round

Declaration

cs-api-definition
public bool TopRightRounded { get; set; }

Property Value

bool

Methods

CreatePath(Rectangle)

Creates a GraphicsPath using the specified rectangle as bounds. This method must be implemented by derived classes.

Declaration

cs-api-definition
public override GraphicsPath CreatePath(Rectangle bounds)

Parameters

bounds

Rectangle

The rectangle defining the bounds for the shape.

Returns

GraphicsPath

A GraphicsPath representing the shape within the specified bounds.

Overrides ElementShape.CreatePath(Rectangle)

CreatePath(RectangleF)

Creates round rectangle like path.

Declaration

cs-api-definition
public override GraphicsPath CreatePath(RectangleF bounds)

Parameters

bounds

RectangleF

Returns

GraphicsPath

Overrides ElementShape.CreatePath(RectangleF)

CreateRegion(Rectangle)

Declaration

cs-api-definition
public override Region CreateRegion(Rectangle bounds)

Parameters

bounds

Rectangle

Returns

Region

Overrides ElementShape.CreateRegion(Rectangle)

DeserializeProperties(string)

Deserializes properties. Required for telerik deserialization mechanism.

Declaration

cs-api-definition
public override void DeserializeProperties(string propertiesString)

Parameters

propertiesString

string

Overrides ElementShape.DeserializeProperties(string)

SerializeProperties()

Serializes properties. Required for telerik serialization mechanism.

Declaration

cs-api-definition
public override string SerializeProperties()

Returns

string

Overrides ElementShape.SerializeProperties()

ShouldMirrorPath()

Declaration

cs-api-definition
protected override bool ShouldMirrorPath()

Returns

bool

Overrides ElementShape.ShouldMirrorPath()