Skip to main content

Custom Shapes Tutorial. Step 4: Load a Shape to the Repository

In the previous step, you specified optional settings of each shape.

This step demonstrates how to add the shapes to the control’s repository.

A code sample of each shape is shown here.

You can load custom XML-based shapes from a file or stream. To add the shape to a predefined or existing stencil, pass its unique identifier as the AStencilID parameter. If the repository has no specified stencil, the procedure creates a new shape category, the AStencilCaption parameter defines its name and appends the shape(s) to it.

The following code snippet demonstrates how to load custom shapes from a file:

dxFlowChart1.Repository.LoadShapesFromFile('C:\ShapeSources\MyShapes.xml', 'ACustomStencil', 'Custom Shapes');

The result is shown below.

See Also