Unplanned
Last Updated: 17 Nov 2022 09:02 by ADMIN
Martin
Created on: 17 Nov 2022 08:48
Category: ShapedForm
Type: Bug Report
1
ShapeForm: Corner Radius can't be removed when RoundRectShape is applied to the Shape property
The corner radius can't be removed when RoundRectShape is applied to the Shape property.
1 comment
ADMIN
Dinko | Tech Support Engineer
Posted on: 17 Nov 2022 09:02

Hi Martin,

Thank you for bringing this behavior to our attention.

As a workaround you can override the IsRectangularShape() method of the ShapedForm to return false. This way you can remove the radius of some of the corners of the ShapeForm.

public Form1()
{
    InitializeComponent();
    this.Load += Form1_Load;

}
protected override bool IsRectangularShape(ref int radius)
{
    return false;
}

private void Form1_Load(object sender, EventArgs e)
{
    this.BorderColor = Color.Red;
    this.BorderWidth = 2;
    RoundRectShape roundRectShape = new RoundRectShape();
    roundRectShape.Radius = 30;
    roundRectShape.BottomRightRounded = false;
    roundRectShape.TopLeftRounded = false;
    this.Shape = roundRectShape;
}

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.