Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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:

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

The result is shown below.

See Also