Defines the fluent API for configuring the Telerik UI Diagram for ASP.NET Core.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
TShapeModel
TConnectionModel
Syntax:
public class DiagramBuilder<TShapeModel, TConnectionModel> : WidgetBuilderBase<Diagram<TShapeModel, TConnectionModel>, DiagramBuilder<TShapeModel, TConnectionModel>>, IHtmlContent where TShapeModel : class where TConnectionModel : class
Inheritance: objectHelperResultWidgetBuilderBase<Diagram<TShapeModel, TConnectionModel>, DiagramBuilder<TShapeModel, TConnectionModel>>DiagramBuilder<TShapeModel, TConnectionModel>
Implements:
Inherited Members
Constructors
Initializes a new instance of the DiagramBuilder<TShapeModel, TConnectionModel> class.
public DiagramBuilder(Diagram<TShapeModel, TConnectionModel> component)
Methods
Defines accessibility options for the diagram.
public DiagramBuilder<TShapeModel, TConnectionModel> Accessibility(Action<DiagramAccessibilitySettingsBuilder<TShapeModel, TConnectionModel>> configurator)
The DiagramAccessibilitySettingsBuilder<TShapeModel, TConnectionModel> for the accessibility setting.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramBuilder<TShapeModel, TConnectionModel> .
If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.
public DiagramBuilder<TShapeModel, TConnectionModel> AutoBind(bool value)
The value for AutoBind
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
Defines the defaults of the connections. Whenever a connection is created, the specified connectionDefaults will be used and merged with the (optional) configuration passed through the connection creation method.
public DiagramBuilder<TShapeModel, TConnectionModel> ConnectionDefaults(Action<DiagramConnectionDefaultsSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
The DiagramConnectionDefaultsSettingsBuilder<TShapeModel, TConnectionModel> for the connectiondefaults setting.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramBuilder<TShapeModel, TConnectionModel> .
Defines the connections configuration.
public DiagramBuilder<TShapeModel, TConnectionModel> Connections(Action<DiagramConnectionFactory<TShapeModel, TConnectionModel>> configurator)
The DiagramConnectionFactory<TShapeModel, TConnectionModel> for the connections setting.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramBuilder<TShapeModel, TConnectionModel> .
Defines the DataSource of the connections.
public DiagramBuilder<TShapeModel, TConnectionModel> ConnectionsDataSource(Action<DiagramConnectionDataSourceBuilder<TConnectionModel>> configurator)
The action that configures the ConnectionsDataSource(Action<DiagramConnectionDataSourceBuilder<TConnectionModel>>).
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
A reference to the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
Defines the hierarchical DataSource of the Diagram component.
public DiagramBuilder<TShapeModel, TConnectionModel> DataSource(Action<DiagramDataSourceBuilder<TShapeModel>> configurator)
The action that configures the DataSource(Action<DiagramDataSourceBuilder<TShapeModel>>).
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
A reference to the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
A set of settings to configure the Diagram behavior when the user attempts to: edit, delete or create shapes and connections.; drag shapes.; resize shapes. or rotate shapes..
public DiagramBuilder<TShapeModel, TConnectionModel> Editable(Action<DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
The DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> for the editable setting.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramBuilder<TShapeModel, TConnectionModel> .
A set of settings to configure the Diagram behavior when the user attempts to: edit, delete or create shapes and connections.; drag shapes.; resize shapes. or rotate shapes..
public DiagramBuilder<TShapeModel, TConnectionModel> Editable(bool enabled)
Enables or disables the editable option.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> .
Configures the client-side events.
public DiagramBuilder<TShapeModel, TConnectionModel> Events(Action<DiagramEventBuilder> configurator)
The client events action.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
The layout of a diagram consists in arranging the shapes (sometimes also the connections) in some fashion in order to achieve an aesthetically pleasing experience to the user. It aims at giving a more direct insight in the information contained within the diagram and its relational structure.On a technical level, layout consists of a multitude of algorithms and optimizations: analysis of the relational structure (loops, multi-edge occurrence...); connectedness of the diagram and the splitting into disconnected components; crossings of connections or bends and length of links. and various ad-hoc calculations which depend on the type of layout. The criteria on which an algorithm is based vary but the common denominator is: a clean separation of connected components (subgraphs); an orderly organization of the shapes in such a way that siblings are close to another, i.e. a tight packing of shapes which belong together (parent of child relationship) or a minimum of connection crossings. Kendo diagram includes three of the most used layout algorithms which should cover most of your layout needs - tree layout, force-directed layout and layered layout. Please, check the type property for more details regarding each type.
public DiagramBuilder<TShapeModel, TConnectionModel> Layout(Action<DiagramLayoutSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
The DiagramLayoutSettingsBuilder<TShapeModel, TConnectionModel> for the layout setting.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramBuilder<TShapeModel, TConnectionModel> .
Defines the keyboard navigation options for the diagram.
public DiagramBuilder<TShapeModel, TConnectionModel> Navigatable(Action<DiagramNavigatableSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
The DiagramNavigatableSettingsBuilder<TShapeModel, TConnectionModel> for the navigatable setting.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramBuilder<TShapeModel, TConnectionModel> .
Defines the pannable options. Use this setting to disable Diagram pan or change the key that activates the pan behavior.
public DiagramBuilder<TShapeModel, TConnectionModel> Pannable(Action<DiagramPannableSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
The DiagramPannableSettingsBuilder<TShapeModel, TConnectionModel> for the pannable setting.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramBuilder<TShapeModel, TConnectionModel> .
Defines the pannable options. Use this setting to disable Diagram pan or change the key that activates the pan behavior.
public DiagramBuilder<TShapeModel, TConnectionModel> Pannable(bool enabled)
Enables or disables the pannable option.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramPannableSettingsBuilder<TShapeModel, TConnectionModel> .
Configures the export settings for the saveAsPDF method.
public DiagramBuilder<TShapeModel, TConnectionModel> Pdf(Action<DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
The DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> for the pdf setting.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramBuilder<TShapeModel, TConnectionModel> .
Defines the Diagram selection options.By default, you can select shapes in the Diagram in one of two ways: Clicking a single shape to select it and deselect any previously selected shapes. or Holding the Ctrl key while clicking multiple shapes to select them and any other shapes between them.. Using the selectable configuration, you can enable single selection only, enable selection by drawing a rectangular area with the mouse around shapes in the canvas, or disable selection altogether.
public DiagramBuilder<TShapeModel, TConnectionModel> Selectable(Action<DiagramSelectableSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
The DiagramSelectableSettingsBuilder<TShapeModel, TConnectionModel> for the selectable setting.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramBuilder<TShapeModel, TConnectionModel> .
Defines the Diagram selection options.By default, you can select shapes in the Diagram in one of two ways: Clicking a single shape to select it and deselect any previously selected shapes. or Holding the Ctrl key while clicking multiple shapes to select them and any other shapes between them.. Using the selectable configuration, you can enable single selection only, enable selection by drawing a rectangular area with the mouse around shapes in the canvas, or disable selection altogether.
public DiagramBuilder<TShapeModel, TConnectionModel> Selectable(bool enabled)
Enables or disables the selectable option.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramSelectableSettingsBuilder<TShapeModel, TConnectionModel> .
Defines the default options that will be applied to all shapes in the Diagram.
public DiagramBuilder<TShapeModel, TConnectionModel> ShapeDefaults(Action<DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
The DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> for the shapedefaults setting.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramBuilder<TShapeModel, TConnectionModel> .
Defines the shape options.
public DiagramBuilder<TShapeModel, TConnectionModel> Shapes(Action<DiagramShapeFactory<TShapeModel, TConnectionModel>> configurator)
The DiagramShapeFactory<TShapeModel, TConnectionModel> for the shapes setting.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramBuilder<TShapeModel, TConnectionModel> .
The tabIndex value to set on the diagram element.
public DiagramBuilder<TShapeModel, TConnectionModel> TabIndex(double value)
The value for TabIndex
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
The template which renders the content of the shape when bound to a dataSource. The names you can use in the template correspond to the properties used in the dataSource. For an example, refer to the dataSource topic below.
public DiagramBuilder<TShapeModel, TConnectionModel> Template(string value)
The value for Template
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
The template which renders the content of the shape when bound to a dataSource. The names you can use in the template correspond to the properties used in the dataSource. For an example, refer to the dataSource topic below.
public DiagramBuilder<TShapeModel, TConnectionModel> Template<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the template.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
The template which renders the content of the shape when bound to a dataSource. The names you can use in the template correspond to the properties used in the dataSource. For an example, refer to the dataSource topic below.
public DiagramBuilder<TShapeModel, TConnectionModel> TemplateHandler(string templateHandler)
The handler that returs the template for Template
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
The template which renders the content of the shape when bound to a dataSource. The names you can use in the template correspond to the properties used in the dataSource. For an example, refer to the dataSource topic below.
public DiagramBuilder<TShapeModel, TConnectionModel> TemplateId(string templateId)
The ID of the template element for Template
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
The template which renders the content of the shape when bound to a dataSource. The names you can use in the template correspond to the properties used in the dataSource. For an example, refer to the dataSource topic below.
public DiagramBuilder<TShapeModel, TConnectionModel> TemplateView(IHtmlContent templateView)
The view that contains the template for Template
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
The diagram theme. With versions prior to R1 2023 this can be either the respective LESS theme from the list below or "sass". When set to "sass" the diagram will read the variables from a Sass-based theme.Note: Since Q2 2024 release, the default value for the theme property is "sass" instead of "default". It is recommended to use "sass" with version Q2 2024 or later.The supported values are: * "sass" * "black" * "blueopal" * "bootstrap" * "bootstrap-v4" - works only with the Bootstrap-v4 Sass theme loaded in the page * "default" * "default-v2" - works only with the Default-v2 Sass theme loaded in the page * "fiori" * "flat" * "highcontrast" * "material" * "materialBlack" * "metro" * "metroblack" * "moonlight" * "nova" * "office365" * "silver" * "uniform"
public DiagramBuilder<TShapeModel, TConnectionModel> Theme(string value)
The value for Theme
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
Defines the tooltip settings for the diagram.
public DiagramBuilder<TShapeModel, TConnectionModel> Tooltip(Action<DiagramTooltipSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
The DiagramTooltipSettingsBuilder<TShapeModel, TConnectionModel> for the tooltip setting.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramBuilder<TShapeModel, TConnectionModel> .
Defines the tooltip settings for the diagram.
public DiagramBuilder<TShapeModel, TConnectionModel> Tooltip(bool enabled)
Enables or disables the tooltip option.
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current instance of DiagramTooltipSettingsBuilder<TShapeModel, TConnectionModel> .
The default zoom level of the Diagram in percentages.
public DiagramBuilder<TShapeModel, TConnectionModel> Zoom(double value)
The value for Zoom
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
The maximum zoom level in percentages. The user will not be allowed to zoom in past this level.
public DiagramBuilder<TShapeModel, TConnectionModel> ZoomMax(double value)
The value for ZoomMax
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
The minimum zoom level in percentages. The user will not be allowed to zoom out past this level. You can see an example in zoomMax.
public DiagramBuilder<TShapeModel, TConnectionModel> ZoomMin(double value)
The value for ZoomMin
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current DiagramBuilder<TShapeModel, TConnectionModel> instance.
The zoom step when using the mouse-wheel to zoom in or out.
public DiagramBuilder<TShapeModel, TConnectionModel> ZoomRate(double value)
The value for ZoomRate
Returns:DiagramBuilder<TShapeModel, TConnectionModel>
Returns the current DiagramBuilder<TShapeModel, TConnectionModel> instance.