Skip to main content

DiagramCustomShape.BackgroundImageUrl Property

Specifies the shape background image’s URL.

Namespace: DevExpress.Web.ASPxDiagram

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

NuGet Package: DevExpress.Web


public string BackgroundImageUrl { get; set; }

Property Value

Type Default Description
String String.Empty

The URL of an SVG image.


A custom shape can be created based on a default shape type or with a custom background image. Use the BackgroundImageUrl property to specify a background SVG image for a shape. The BackgroundImageUrl property is in effect if the BaseType property value is Unset.

Run Demo: Diagram - Custom Shapes

The Type property identifies custom shapes. This property should be specified and unique.



The following example shows how to create a custom shape and add it to a custom category.

<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px">
            <dx:DiagramToolboxGroup Category="General" />
            <dx:DiagramToolboxGroup Category="Custom" CustomCategoryName="others" Title="Others" />
        <dx:DiagramCustomShape CategoryName="others" Type="Rounded rectangle" DefaultWidth="1" 
            DefaultHeight="0.75" BackgroundImageUrl="../Content/images/shapes/roundedRectangle.svg">
<svg  xmlns="" x="0px" y="0px" viewBox="0 0 48 26">
        <rect rx="5" ry="5" x="0.5" y="0.5" width="47" height="25"

Diagram Custom Shapes

See Also