The DevExpress ASP.NET Diagram (ASPxDiagram) control supports the template technology that allows you to completely customize a custom shape's appearance and layout.
Handle the CustomShapeCreateTemplate event to specify a template for custom shapes. The event argument’s item property provides access to the currently processed item. Add the template content, which must be presented as SVG elements, to the container property.
In this demo, the CustomShapeCreateTemplate event handler adds the 'Show Details' link to a shape. When clicked, it displays a popup window that contains additional information about a department.