Click or drag to resize
RadDiagramAddShape Method (Object, Geometry, NullablePoint, Boolean)
Adds a new shape to the diagram.

Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.RadDiagram (in Telerik.WinControls.RadDiagram.dll) Version: 2018.3.911.40 (2018.3.911.40)
public IShape AddShape(
	Object content,
	Geometry geometry = null,
	Nullable<Point> position = null,
	bool isUndoable = false


Type: SystemObject
The content of the shape.
geometry (Optional)
Type: Telerik.Windows.Diagrams.CoreGeometry
The geometry.
position (Optional)
Type: SystemNullablePoint
The position.
isUndoable (Optional)
Type: SystemBoolean
If set to true the action is undoable.

Return Value

Type: IShape
The added shape.
The given object will be inserted as the content of a new RadDiagramShape and will internally uniquely identify the shape. Alternatively, you can instantiate a new shape and use this same AddShape method to add it to the diagram, in which case the shape rather than the content will uniquely identify it internally.
See Also