Back to Devexpress

Ribbon UI with Diagram-Related Commands

windowsforms-116880-controls-and-libraries-diagrams-diagram-control-ribbon.md

latest3.4 KB
Original Source

Ribbon UI with Diagram-Related Commands

  • Aug 08, 2025
  • 2 minutes to read

The Ribbon UI contains diagram-related commands. Users can load and save diagrams, format text, style shapes, adjust the canvas, and perform other actions.

Display Ribbon UI

To display a Ribbon UI with diagram-related commands, use the DiagramControl‘s built-in ribbon integration:

  1. Select the Diagram control.
  2. Open its smart tag menu and select Create Ribbon Menu.

The following code snippet uses the CreateRibbon() method to create a Ribbon UI with diagram commands:

csharp
diagramControl1.CreateRibbon();

If you already have a RibbonControl on your form, call the InitializeRibbon method to populate it with diagram-related commands.

csharp
diagramControl1.InitializeRibbon(ribbonControl1);

Ribbon Commands

PageGroupDescription
HomeClipboardCopy and paste shapes.
FontChange font settings of the selected shape.
TextAlign text within the shape.
ToolsSelect pointer, connector, and other tools.
Shape StylesSet background and border colors using predefined styles or custom color pickers.
ArrangeChange the Z-order of selected shapes.
InsertContainerAdd a styles container to the canvas.
PictureInsert an image into the diagram (opens the Insert Picture dialog).
ViewShowToggle visibility of the Shapes panel, Properties panel, rulers, and gridlines.
ZoomZoom the diagram to fit or fill the window.
DesignPage SetupChange orientation and page size, or enable auto resize when dragging shapes beyond canvas bounds.
ThemesApply a theme to the diagram.
OptionsConfigure snap behavior and alignment sensitivity.
LayoutRearrange shapes and connectors, rearrange diagram layout.

Additional UI Elements

Application MenuCreate, open, save, export, or print diagrams.Undo/Redo CommandsRevert or reapply recent changes.Page Setup Dialog

Click the dialog box launcher button in the Page Setup or Layout group to access advanced options (page size, margins, line jumps).

Contextual Ribbon Pages

Container Tools : Appears when a container is selected.

Image Tools : Appears when an image is selected.