Skip to main content

DiagramBuilder Methods

A Diagram control.
Name Description
AutoZoomMode(DiagramAutoZoomMode) Specifies how the Diagram UI component automatically zooms the work area. Mirrors the client-side autoZoomMode object.
ContextMenu(Action<DiagramContextMenuBuilder>) Configures the context menu's settings. Mirrors the client-side contextMenu object.
ContextToolbox(Action<DiagramContextToolboxBuilder>) Configures the context toolbox's settings. Mirrors the client-side contextToolbox object.
CustomShapes(Action<CollectionFactory<DiagramCustomShapeBuilder>>) Provides access to the client-side customShapes option that represents a custom shape collection.
CustomShapeTemplate(JS) Specifies the client-side customShapeTemplate.
CustomShapeTemplate(RazorBlock) Specifies the client-side customShapeTemplate.
CustomShapeTemplate(TemplateName) Specifies the client-side customShapeTemplate.
CustomShapeTemplate(String) Specifies the client-side customShapeTemplate.
CustomShapeToolboxTemplate(JS) Specifies a custom template for shapes in the toolbox. Mirrors the client-side customShapeToolboxTemplate object.
CustomShapeToolboxTemplate(RazorBlock) Specifies a custom template for shapes in the toolbox. Mirrors the client-side customShapeToolboxTemplate object.
CustomShapeToolboxTemplate(TemplateName) Specifies a custom template for shapes in the toolbox. Mirrors the client-side customShapeToolboxTemplate object.
CustomShapeToolboxTemplate(String) Specifies a custom template for shapes in the toolbox. Mirrors the client-side customShapeToolboxTemplate object.
DefaultItemProperties(Action<DiagramDefaultItemPropertiesBuilder>) Configures default item properties. Mirrors the client-side defaultItemProperties object.
Disabled(JS) Specifies whether the UI component responds to user interaction. Mirrors the client-side disabled option.
Disabled(Boolean) Specifies whether the UI component responds to user interaction. Mirrors the client-side disabled option.
Edges(Action<DiagramEdgesBuilder>) Allows you to bind the collection of diagram edges to a data source. For more information, see the Data Binding section. Mirrors the client-side edges object.
Editing(Action<DiagramEditingBuilder>) Specifies which editing operations a user can perform. Mirrors the client-side editing object.
ElementAttr(JS) Mirrors the client-side elementAttr option, specifies attributes for the control’s root HTML element.
ElementAttr(Dictionary<String, Object>) Mirrors the client-side elementAttr option, specifies attributes for the control’s root HTML element.
ElementAttr(Object) Mirrors the client-side elementAttr option, specifies attributes for the control’s root HTML element.
ElementAttr(String, Object) Mirrors the client-side elementAttr option, specifies attributes for the control’s root HTML element.
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
Export(Action<DiagramExportBuilder>) Configures export settings. Mirrors the client-side export object.
FullScreen(JS) Specifies whether or not to display the UI component in full-screen mode. Mirrors the client-side fullScreen option.
FullScreen(Boolean) Specifies whether or not to display the UI component in full-screen mode. Mirrors the client-side fullScreen option.
GetHashCode() Serves as the default hash function. Inherited from Object.
GetType() Gets the Type of the current instance. Inherited from Object.
GridSize(JS) Specifies the grid pitch. Mirrors the client-side gridSize option.
GridSize(Action<DiagramGridSizeBuilder>) Specifies the grid pitch. Mirrors the client-side gridSize object.
GridSize(Double) Specifies the grid pitch. Mirrors the client-side gridSize option.
HasChanges(JS) Indicates whether diagram content has unsaved changes. Mirrors the client-side hasChanges option.
HasChanges(Boolean) Indicates whether diagram content has unsaved changes. Mirrors the client-side hasChanges option.
Height(JS) Specifies the UI component's height. Mirrors the client-side height option.
Height(Double) Specifies the UI component's height. Mirrors the client-side height option.
Height(String) Specifies the UI component's height. Mirrors the client-side height option.
HistoryToolbar(Action<DiagramHistoryToolbarBuilder>) Configures the history toolbar's settings. Mirrors the client-side historyToolbar object.
ID(JS) Specifies the id attribute for the control’s HTML element (used for nested controls within templates).
ID(String) Specifies the id attribute for the control’s HTML element.
MainToolbar(Action<DiagramMainToolbarBuilder>) Configures the main toolbar settings. Mirrors the client-side mainToolbar object.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
Nodes(Action<DiagramNodesBuilder>) Allows you to bind the collection of diagram nodes to a data source. For more information, see the Data Binding section. Mirrors the client-side nodes object.
OnContentReady(RazorBlock) A function that is executed when the UI component is rendered and each time the component is repainted. Mirrors the client-side onContentReady option.
OnContentReady(String) A function that is executed when the UI component is rendered and each time the component is repainted. Mirrors the client-side onContentReady option.
OnCustomCommand(RazorBlock) Mirrors the client-side onCustomCommand option.
OnCustomCommand(String) Mirrors the client-side onCustomCommand option.
OnDisposing(RazorBlock) A function that is executed before the UI component is disposed of. Mirrors the client-side onDisposing option.
OnDisposing(String) A function that is executed before the UI component is disposed of. Mirrors the client-side onDisposing option.
OnInitialized(RazorBlock) A function used in JavaScript frameworks to save the UI component instance. Mirrors the client-side onInitialized option.
OnInitialized(String) A function used in JavaScript frameworks to save the UI component instance. Mirrors the client-side onInitialized option.
OnItemClick(RazorBlock) A function that is executed after a shape or connector is clicked. Mirrors the client-side onItemClick option.
OnItemClick(String) A function that is executed after a shape or connector is clicked. Mirrors the client-side onItemClick option.
OnItemDblClick(RazorBlock) A function that is executed after a shape or connector is double-clicked. Mirrors the client-side onItemDblClick option.
OnItemDblClick(String) A function that is executed after a shape or connector is double-clicked. Mirrors the client-side onItemDblClick option.
OnOptionChanged(RazorBlock) A function that is executed after a UI component property is changed. Mirrors the client-side onOptionChanged option.
OnOptionChanged(String) A function that is executed after a UI component property is changed. Mirrors the client-side onOptionChanged option.
OnRequestEditOperation(RazorBlock) A function that allows you to prohibit an edit operation at run time. Mirrors the client-side onRequestEditOperation option.
OnRequestEditOperation(String) A function that allows you to prohibit an edit operation at run time. Mirrors the client-side onRequestEditOperation option.
OnRequestLayoutUpdate(RazorBlock) A function that allows you to specify whether or not the UI component should reapply its auto layout after diagram data is reloaded. Mirrors the client-side onRequestEditOperation option.
OnRequestLayoutUpdate(String) A function that allows you to specify whether or not the UI component should reapply its auto layout after diagram data is reloaded. Mirrors the client-side onRequestEditOperation option.
OnSelectionChanged(RazorBlock) A function that is executed after the selection is changed in the Diagram. Mirrors the client-side onSelectionChanged option.
OnSelectionChanged(String) A function that is executed after the selection is changed in the Diagram. Mirrors the client-side onSelectionChanged option.
Option(String, Object) Specifies an option by its name.
PageColor(JS) Specifies the color of a diagram page. Mirrors the client-side pageColor option.
PageColor(String) Specifies the color of a diagram page. Mirrors the client-side pageColor option.
PageOrientation(DiagramPageOrientation) Specifies the page orientation. Mirrors the client-side pageOrientation option.
PageSize(Action<DiagramPageSizeBuilder>) Specifies a size of pages. Mirrors the client-side pageSize object.
PropertiesPanel(Action<DiagramPropertiesPanelBuilder>) Configures the Properties panel settings. Mirrors the client-side propertiesPanel object.
ReadOnly(JS) Specifies whether the diagram is read-only. Mirrors the client-side readOnly option.
ReadOnly(Boolean) Specifies whether the diagram is read-only. Mirrors the client-side readOnly option.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
Render() Inherited from WidgetBuilder.
RtlEnabled(JS) Switches the UI component to a right-to-left representation. Mirrors the client-side rtlEnabled option.
RtlEnabled(Boolean) Switches the UI component to a right-to-left representation. Mirrors the client-side rtlEnabled option.
ShowGrid(JS) Specifies whether grid lines are visible. Mirrors the client-side showGrid option.
ShowGrid(Boolean) Specifies whether grid lines are visible. Mirrors the client-side showGrid option.
SimpleView(JS) Switch the Diagram UI component to simple view mode. Mirrors the client-side simpleView option.
SimpleView(Boolean) Switch the Diagram UI component to simple view mode. Mirrors the client-side simpleView option.
SnapToGrid(JS) Specifies whether diagram elements should snap to grid lines. Mirrors the client-side snapToGrid option.
SnapToGrid(Boolean) Specifies whether diagram elements should snap to grid lines. Mirrors the client-side snapToGrid option.
Toolbox(Action<DiagramToolboxBuilder>) Configures the toolbox settings. Mirrors the client-side toolbox object.
ToString() Inherited from WidgetBuilder.
ToTemplate() Renders the control as a template string for use in another control’s template. Inherited from WidgetBuilder.
Units(DiagramUnits) Specifies the measurement unit for size properties. Mirrors the client-side units option.
UseNativeScrolling(JS)
UseNativeScrolling(Boolean)
ViewToolbar(Action<DiagramViewToolbarBuilder>) Configures the view toolbar settings. Mirrors the client-side viewToolbar object.
ViewUnits(DiagramUnits) Specifies the measurement unit that is displayed in user interface elements. Mirrors the client-side viewUnits option.
Visible(JS) Specifies whether the UI component is visible. Mirrors the client-side visible option.
Visible(Boolean) Specifies whether the UI component is visible. Mirrors the client-side visible option.
Width(JS) Specifies the UI component's width. Mirrors the client-side width option.
Width(Double) Specifies the UI component's width. Mirrors the client-side width option.
Width(String) Specifies the UI component's width. Mirrors the client-side width option.
ZoomLevel(JS) Specifies the zoom level. Mirrors the client-side zoomLevel option.
ZoomLevel(Action<DiagramZoomLevelBuilder>) Specifies the zoom level. Mirrors the client-side zoomLevel object.
ZoomLevel(Double) Specifies the zoom level. Mirrors the client-side zoomLevel option.
See Also