[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Collapse]Diagram Control
    Getting Started
   [Expand]Diagram Control
   [Expand]End-User Interaction
   [Collapse]Diagram Items
     Shapes
     Default Shapes
     Connectors
     Containers
     Images
     SVG Shapes
     Items with Custom Content
     Creating Shapes and Containers Using Shape Templates
     Managing Items Interaction
   [Expand]Automatic Layout
   [Expand]Data Binding
    Themes and Styles
    Printing and Exporting
    Saving and Loading Diagrams
   [Expand]Examples
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Images

Diagram image items provide the ability to use images as shapes.

End-users can add image items by selecting the corresponding ribbon item on the Insert Ribbon page. To invoke this dialog in code, use the DiagramControl.InsertImage method.

Image items are encapsulated by DiagramImage class objects. They support all operations available to Shapes, except for text editing and transformation. The DiagramImage.StretchMode property specifies whether the aspect ratio of the source image is preserved when resizing the diagram item.

The source of the image is specified by the DiagramImage.Image property. The following types are supported: byte[], System.Uri, System.IO.Stream, System.Windows.Media.ImageSource.

The DiagramControl.CustomLoadImage event allows you to implement a custom logic for loading images.

When a diagram image item is selected, the Ribbon shows the Image Tools ribbon category that allows end-users to change the source image, set the stretch mode, flip, rotate or move the selected image item(s) in or out in the Z-order and reset applied changes.

Expanded See Also

Is this topic helpful?​​​​​​​