New to Telerik UI for WinForms? Start a free 30-day trial
Custom shapes
Updated on Nov 5, 2025
This tutorial will guide you through the task of creating a custom shape.
Creating custom shapes programmatically
In order to create a custom shape, you need to define a custom shape class deriving from the ElementShape class. Overriding its CreatePath method you can define the desired shape. Afterwards, you need to apply your shape implementation to the RadDiagramShape.ElementShape property:
C#
public class MyShape : ElementShape
{
public override GraphicsPath CreatePath(System.Drawing.Rectangle bounds)
{
GraphicsPath path = new GraphicsPath();
path.AddString("Custom", new System.Drawing.FontFamily("Arial"), 0, bounds.Width, Point.Empty, StringFormat.GenericTypographic);
return path;
}
}
C#
RadDiagramShape shape1 = new RadDiagramShape()
{
Text = "",
ElementShape = new MyShape(),
BackColor = System.Drawing.Color.LightBlue
};
shape1.Position = new Telerik.Windows.Diagrams.Core.Point(100, 80);
radDiagram1.AddShape(shape1);

Creating custom shapes by the Custom Shape Editor
When you open the RadDiagram Property Builder from the Smart Tag and drag a shape from the toolbox you can customize the default shape by editing the ElementShape property and selecting the Create new custom shape ... option from the list:

This will display the Custom Shape Editor.
