DiagramCustomShape.BaseType Property
Specifies the base shape type for the custom shape.
Namespace: DevExpress.Web.ASPxDiagram
Assembly: DevExpress.Web.ASPxDiagram.v20.1.dll
NuGet Package: DevExpress.Web
Declaration
Property Value
Type | Default | Description |
---|---|---|
DiagramShapeType | Unset | The type of the base shape. |
Available values:
Name | Description |
---|---|
Unset | The shape type is not set. |
Text | Text |
Rectangle | |
Ellipse | |
Cross | |
Triangle | |
Diamond | |
Heart | |
Pentagon | |
Hexagon | |
Octagon | |
Star | |
ArrowLeft | |
ArrowTop | |
ArrowRight | |
ArrowBottom | |
ArrowNorthSouth | |
ArrowEastWest | |
Process | |
Decision | |
Terminator | |
PredefinedProcess | |
Document | |
MultipleDocuments | |
ManualInput | |
Preparation | |
Data | |
Database | |
HardDisk | |
InternalStorage | |
PaperTape | |
ManualOperation | |
Delay | |
StoredData | |
Display | |
Merge | |
Connector | |
Or | |
SummingJunction | |
VerticalContainer | |
HorizontalContainer | |
CardWithImageOnLeft | |
CardWithImageOnTop | |
CardWithImageOnRight |
Remarks
A custom shape can be created based on a default shape type or with a custom background image. Use the BaseType property to specify a base type for a shape.
Note, the Type property identifies custom shapes, therefore it must be specified and unique.
protected void Page_Load(object sender, EventArgs e) {
if (!IsPostBack) {
Diagram.Import(File.ReadAllText(MapPath("~/App_Data/diagram-employees.json")));
Diagram.CustomShapes.AddRange(GetEmployeesShapes());
}
}
static IEnumerable<DiagramCustomShape> GetEmployeesShapes() {
return CompanyEmployeesDataProvider.GetCompanyEmployees().Select(e => new DiagramCustomShape {
Type = "emp" + e.EmployeeID,
BaseType = DiagramShapeType.Rectangle,
DefaultText = e.FirstName + " " + e.LastName,
Category = "CategoryEmployees"
});
}
Online Demo
Diagram - Shapes with Base Type.
See Also