New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Defines the fluent API for configuring DiagramEditableSettings

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TShapeModel

TConnectionModel

Syntax:

C#
public class DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> where TShapeModel : class where TConnectionModel : class

Inheritance: objectDiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

DiagramEditableSettingsBuilder method.

C#
public DiagramEditableSettingsBuilder(DiagramEditableSettings<TShapeModel, TConnectionModel> container)
Parameters:containerDiagramEditableSettings<TShapeModel, TConnectionModel>

Properties

Container

DiagramEditableSettings<TShapeModel, TConnectionModel>

Container member.

C#
protected DiagramEditableSettings<TShapeModel, TConnectionModel> Container { get; }

Methods

Specifies the connection editor template which shows up when editing the connection. A template can be used to change the default editors for the connection fields or to prevent some fields from being edited by not rendering an editor input for them.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> ConnectionTemplate(string value)
Parameters:valuestring

The value for ConnectionTemplate

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> instance.

Specifies the connection editor template which shows up when editing the connection. A template can be used to change the default editors for the connection fields or to prevent some fields from being edited by not rendering an editor input for them.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> ConnectionTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the connectiontemplate.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> instance.

Specifies the connection editor template which shows up when editing the connection. A template can be used to change the default editors for the connection fields or to prevent some fields from being edited by not rendering an editor input for them.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> ConnectionTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for ConnectionTemplate

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> instance.

Specifies the connection editor template which shows up when editing the connection. A template can be used to change the default editors for the connection fields or to prevent some fields from being edited by not rendering an editor input for them.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> ConnectionTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for ConnectionTemplate

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> instance.

Specifies the connection editor template which shows up when editing the connection. A template can be used to change the default editors for the connection fields or to prevent some fields from being edited by not rendering an editor input for them.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> ConnectionTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for ConnectionTemplate

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> instance.

Specifies if the shapes and connections can be dragged.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> Drag(Action<DiagramEditableDragSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramEditableDragSettingsBuilder<TShapeModel, TConnectionModel>>

The DiagramEditableDragSettingsBuilder<TShapeModel, TConnectionModel> for the drag setting.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current instance of DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> .

Specifies if the shapes and connections can be dragged.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> Drag(bool enabled)
Parameters:enabledbool

Enables or disables the drag option.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current instance of DiagramEditableDragSettingsBuilder<TShapeModel, TConnectionModel> .

Specifies if the shapes and connections can be removed.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> Remove(bool value)
Parameters:valuebool

The value for Remove

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> instance.

Defines the look-and-feel of the shape resizing handles.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> Resize(Action<DiagramEditableResizeSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramEditableResizeSettingsBuilder<TShapeModel, TConnectionModel>>

The DiagramEditableResizeSettingsBuilder<TShapeModel, TConnectionModel> for the resize setting.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current instance of DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> .

Defines the look-and-feel of the shape resizing handles.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> Resize(bool enabled)
Parameters:enabledbool

Enables or disables the resize option.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current instance of DiagramEditableResizeSettingsBuilder<TShapeModel, TConnectionModel> .

Specifies whether the shapes can be rotated. Note that changing this setting after creating the diagram will have no effect.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> Rotate(Action<DiagramEditableRotateSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramEditableRotateSettingsBuilder<TShapeModel, TConnectionModel>>

The DiagramEditableRotateSettingsBuilder<TShapeModel, TConnectionModel> for the rotate setting.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current instance of DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> .

Specifies whether the shapes can be rotated. Note that changing this setting after creating the diagram will have no effect.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> Rotate(bool enabled)
Parameters:enabledbool

Enables or disables the rotate option.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current instance of DiagramEditableRotateSettingsBuilder<TShapeModel, TConnectionModel> .

Specifies the shape editor template. You can use it to customize the editing UI of the shape or to display editor controls only for certain fields of the shape data item.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> ShapeTemplate(string value)
Parameters:valuestring

The value for ShapeTemplate

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> instance.

Specifies the shape editor template. You can use it to customize the editing UI of the shape or to display editor controls only for certain fields of the shape data item.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> ShapeTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the shapetemplate.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> instance.

Specifies the name of the editor template that contains a Template component, which defines the editors for the shape data item. The editor template must be added in the 'Views/Shared/EditorTemplates/' folder.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> ShapeTemplateComponentName(string templateName)
Parameters:templateNamestring

The name of the Razor view editor template.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

The current DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> instance.

Example:
C#
@(Html.Kendo().Diagram&lt;OrgChartShape, OrgChartConnection&gt;()
.Name("diagram")
.Editable(editable =&gt; editable.ShapeTemplateComponentName("DiagramShapeEditor"))
)

Specifies the shape editor template. You can use it to customize the editing UI of the shape or to display editor controls only for certain fields of the shape data item.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> ShapeTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for ShapeTemplate

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> instance.

Specifies the shape editor template. You can use it to customize the editing UI of the shape or to display editor controls only for certain fields of the shape data item.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> ShapeTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for ShapeTemplate

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> instance.

Specifies the name of the shape editor template. You can use it to customize the editing UI of the shape or to display editor controls only for certain fields of the shape data item.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> ShapeTemplateName(string value)
Parameters:valuestring

The name of the Razor view editor template.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

The current DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> instance.

Example:
C#
@(Html.Kendo().Diagram&lt;OrgChartShape, OrgChartConnection&gt;()
.Name("diagram")
.Editable(editable =&gt; editable.ShapeTemplateName("DiagramShapeEditor"))
)

Specifies the shape editor template. You can use it to customize the editing UI of the shape or to display editor controls only for certain fields of the shape data item.

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> ShapeTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for ShapeTemplate

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> instance.

Specifies the toolbar tools. Supports all options supported by the toolbar.items property. Predefined tools are: "edit" - The selected item can be edited.; "createShape" - Adds an empty shape data item and a popup window is displayed.; "createConnection" - Adds an empty connection data item and a popup window is displayed.; "undo" - Undoes the previous action.; "redo" - Executes again the previously undone action.; "rotateClockwise" - The selected items can be rotated clockwise. The default rotation value is 90 degree. or "rotateAnticlockwise" - The selected items can be rotated anticlockwise. The default rotation value is 90 degree..

C#
public DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> Tools(Action<DiagramEditableSettingsToolFactory<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramEditableSettingsToolFactory<TShapeModel, TConnectionModel>>

The DiagramEditableSettingsToolFactory<TShapeModel, TConnectionModel> for the tools setting.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current instance of DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel> .