Skip to main content

Ribbon UI with Diagram-Related Commands

  • 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.

Ribbon UI - WinForms Diagram Control, DevExpress

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.

    Create the Ribbon UI with Diagram-Related Commands, DevExpress

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

diagramControl1.CreateRibbon();

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

diagramControl1.InitializeRibbon(ribbonControl1);

Ribbon Commands

Page Group Description
Home Clipboard Copy and paste shapes.
Font Change font settings of the selected shape.
Text Align text within the shape.
Tools Select pointer, connector, and other tools.
Shape Styles Set background and border colors using predefined styles or custom color pickers.
Arrange Change the Z-order of selected shapes.
Insert Container Add a styles container to the canvas.
Picture Insert an image into the diagram (opens the Insert Picture dialog).
View Show Toggle visibility of the Shapes panel, Properties panel, rulers, and gridlines.
Zoom Zoom the diagram to fit or fill the window.
Design Page Setup Change orientation and page size, or enable auto resize when dragging shapes beyond canvas bounds.
Themes Apply a theme to the diagram.
Options Configure snap behavior and alignment sensitivity.
Layout Rearrange shapes and connectors, rearrange diagram layout.

Additional UI Elements

Application Menu
Create, open, save, export, or print diagrams.
Undo/Redo Commands
Revert or reapply recent changes.
Page Setup Dialog

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

WinForms Diagram - Page Setup, DevExpress

Contextual Ribbon Pages

Container Tools: Appears when a container is selected.

Container Tools - WinForms Diagram, DevExpress

Image Tools: Appears when an image is selected.

Image Tools - WinForms Diagram, DevExpress