All docs
V21.2
21.2
21.1
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DiagramCustomShape.DefaultImageUrl Property

Specifies the shape image’s URL.

Namespace: DevExpress.Web.ASPxDiagram

Assembly: DevExpress.Web.ASPxDiagram.v21.2.dll

Declaration

[DefaultValue("")]
public string DefaultImageUrl { get; set; }

Property Value

Type Default Description
String

String.Empty

The image URL.

Remarks

A custom shape supports an inner image in two cases:

  • When a shape is created based on a card shape type (the BaseType property is set to CardWithImageOnLeft, CardWithImageOnRight, or CardWithImageOnTop). Note that in this case, the image size and position properties are not in effect, because they are predefined in the shape type.
  • When a shape is created based on a custom SVG image (with the BackgroundImageUrl property specified). In this case, you can use the following properties to customize inner image size and position: ImageHeight, ImageWidth, ImageLeft, and ImageTop.

Use the DefaultImageUrl property to specify the image URL.

<dx:DiagramCustomShape Type="Rounded Rectangle" BackgroundImageUrl="../Content/images/shapes/roundedRect.svg" 
  DefaultWidth="2" DefaultHeight="1" 
  DefaultImageUrl="../Content/images/photo.png" 
  ImageHeight="0.8" ImageWidth="0.3" ImageTop="0.1" ImageLeft="0.1"
  DefaultText ="Employee" TextLeft="0.4" TextWidth="0.6" />

The image below shows the result:

Custom Shape Text

If the AllowEditImage property is set to true, the diagram context menu displays commands that allow users to change the image.

Custom Shape Image Context Menu

See Also