aspnet-devexpress-dot-web-dot-aspxdiagram-dot-diagramcustomshape-da2f7327.md
Specifies the shape background image’s URL.
Namespace : DevExpress.Web.ASPxDiagram
Assembly : DevExpress.Web.ASPxDiagram.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue("")]
public string BackgroundImageUrl { get; set; }
<DefaultValue("")>
Public Property BackgroundImageUrl As String
| 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">
<SettingsToolbox>
<Groups>
<dx:DiagramToolboxGroup Category="General" />
<dx:DiagramToolboxGroup Category="Custom" CustomCategoryName="others" Title="Others" />
</Groups>
</SettingsToolbox>
<CustomShapes>
<dx:DiagramCustomShape CategoryName="others" Type="Rounded rectangle" DefaultWidth="1"
DefaultHeight="0.75" BackgroundImageUrl="../Content/images/shapes/roundedRectangle.svg">
</dx:DiagramCustomShape>
</CustomShapes>
</dx:ASPxDiagram>
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 48 26">
<g>
<rect rx="5" ry="5" x="0.5" y="0.5" width="47" height="25"
style="fill:#FFFFFF;stroke:#000000;stroke-width:1px;"/>
</g>
</svg>
See Also