skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RoundRectShape

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

Inheritance
System.Object
ElementShape
RoundRectShape
Inherited Members
ElementShape.GetElementShape(RadElement)
ElementShape.GetElementContour(RadElement)
ElementShape.GetElementContour(Rectangle)
ElementShape.GetBounds(RadElement)
ElementShape.CreateContour(Rectangle)
ElementShape.MirrorPath(GraphicsPath, RectangleF)
ElementShape.Dispose(Boolean)
ElementShape.IsRightToLeft
Namespace: Telerik.WinControls
Assembly: Telerik.WinControls.dll

Syntax

[ComVisible(false)]
public class RoundRectShape : ElementShape
Remarks

This shape allows for creating rounded rectangles with fine-grained control over which corners are rounded and the radius of the rounded corners. Each corner can be independently configured to be rounded or square.

Constructors

RoundRectShape()

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

Declaration
public RoundRectShape()

RoundRectShape(IContainer)

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

Declaration
public RoundRectShape(IContainer components)
Parameters
System.ComponentModel.IContainer components

The container to add this shape to.

RoundRectShape(Int32)

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

Declaration
public RoundRectShape(int radius)
Parameters
System.Int32 radius

The radius for all rounded corners.

RoundRectShape(Int32, Boolean, Boolean, Boolean, Boolean)

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

Declaration
public RoundRectShape(int radius, bool topLeftRounded, bool bottomLeftRounded, bool topRightRounded, bool bottomRightRounded)
Parameters
System.Int32 radius

The radius for rounded corners.

System.Boolean topLeftRounded

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

System.Boolean bottomLeftRounded

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

System.Boolean topRightRounded

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

System.Boolean bottomRightRounded

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
public bool BottomLeftRounded { get; set; }
Property Value
System.Boolean

BottomRightRounded

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

Declaration
public bool BottomRightRounded { get; set; }
Property Value
System.Boolean

Radius

Gets or sets the radius of the rounded corners.

Declaration
public int Radius { get; set; }
Property Value
System.Int32

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
public bool TopLeftRounded { get; set; }
Property Value
System.Boolean

TopRightRounded

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

Declaration
public bool TopRightRounded { get; set; }
Property Value
System.Boolean

Methods

CreatePath(Rectangle)

Declaration
public override GraphicsPath CreatePath(Rectangle bounds)
Parameters
System.Drawing.Rectangle bounds

Returns
System.Drawing.Drawing2D.GraphicsPath

Overrides
ElementShape.CreatePath(Rectangle)

CreatePath(RectangleF)

Creates round rectangle like path.

Declaration
public override GraphicsPath CreatePath(RectangleF bounds)
Parameters
System.Drawing.RectangleF bounds

Returns
System.Drawing.Drawing2D.GraphicsPath

Overrides
ElementShape.CreatePath(RectangleF)

CreateRegion(Rectangle)

Declaration
public override Region CreateRegion(Rectangle bounds)
Parameters
System.Drawing.Rectangle bounds

Returns
System.Drawing.Region

Overrides
ElementShape.CreateRegion(Rectangle)

DeserializeProperties(String)

Deserializes properties. Required for telerik deserialization mechanism.

Declaration
public override void DeserializeProperties(string propertiesString)
Parameters
System.String propertiesString

Overrides
ElementShape.DeserializeProperties(String)

SerializeProperties()

Serializes properties. Required for telerik serialization mechanism.

Declaration
public override string SerializeProperties()
Returns
System.String

Overrides
ElementShape.SerializeProperties()

ShouldMirrorPath()

Declaration
protected override bool ShouldMirrorPath()
Returns
System.Boolean

Overrides
ElementShape.ShouldMirrorPath()

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.