Skip to main content

DevExpress v25.1 Update — Your Feedback Matters

Our What's New in v25.1 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

How to: Create Custom Diagram Containers and Register them in the Toolbox and Ribbon Gallery

In this example, we show how to create containers with custom headers and padding. DiagramControl supports a special language for defining containers. The root element that contains a container description is ContainerShapeTemplate. This element describes a container contour and may contain several segments:

  • Start – Specifies the start point.
  • Line – Defines a line with start and end points.
  • Arc – Defines an arc with start and end points.

To define a container’s header editor position, use the EditorBounds property.

To register custom containers in the ribbon gallery, use the DiagramContainerGalleryRegistrator.RegisterContainerShapes method.

View Example