Skip to main content

DiagramCustomShape.ImageHeight Property

Specifies the height of the image in the shape.

Namespace: DevExpress.Web.ASPxDiagram

Assembly: DevExpress.Web.ASPxDiagram.v22.1.dll

Declaration

[DefaultValue(typeof(decimal), "1")]
public decimal ImageHeight { get; set; }

Property Value

Type Default Description
Decimal

“1”

A decimal number from 0 to 1.

Remarks

The DefaultImageUrl property specifies the URL of an image displayed inside the shape. Use the ImageHeight property to specify the ratio of the image’s height to the shape’s height. If the ImageHeight property is set to 1, the image height is then equal to the shape height.

Note

The ImageHeight property is not in effect if the BaseType property is specified.

<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

See Also