Skip to main content

Images

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

diagram_images

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.

diagram_image_tools

See Also