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

Defines the fluent API for configuring the DiagramEditableSettings settings.

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

C#
public DiagramEditableSettingsBuilder(DiagramEditableSettings<TShapeModel, TConnectionModel> settings)
Parameters:settingsDiagramEditableSettings<TShapeModel, TConnectionModel>

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 that configures the connection template.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

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>

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 value)
Parameters:valuestring

The value that configures the connection template.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(e =&gt; e.ConnectionTemplateHandler("getConnectionTemplate"))
)

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 value)
Parameters:valuestring

The value that configures the connection template.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(e =&gt; e.ConnectionTemplateId("connectionEditorTemplate"))
)

Specifies the name of the connection editor template.

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

The name of the Razor view editor template.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(editable =&gt; editable.ConnectionTemplateName("DiagramShapeEditor"))
)

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(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the connection template.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(e =&gt; e.ConnectionTemplateView(Html.Partial("ConnectionTemplateView")))
)

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 action that configures the drag settings.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(e =&gt; e.Drag(d =&gt; d.Snap(s =&gt; s.Size(80))))
)

Specifies if the shapes and connections can be dragged.

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

The value that enables or disables the Drag option.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(e =&gt; e.Drag(true))
)

Specifies if the shapes and connections can be removed.

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

The value that enables or disables the Remove option.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(e =&gt; e.Remove(true))
)

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

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

The action that configures the resize settings.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(e =&gt; e.Resize(r =&gt; r.Width(20).Height(20)))
)

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

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

The value that enables or disables the Resize option.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(e =&gt; e.Resize(true))
)

Specifies rotate settings of the shapes.

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

The action that configures the rotate settings.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(e =&gt; e.Rotate(r =&gt; r.Fill(f =&gt; f.Color("green"))))
)

Specifies rotate settings of the shapes.

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

The value that enables or disables the Rotate option.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(e =&gt; e.Rotate(true))
)

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 that configures the shapetemplate.

Returns:

DiagramEditableSettingsBuilder<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<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the shapetemplate.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

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>

Example:
C#
@(Html.Kendo().Diagram()
.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 value)
Parameters:valuestring

The value that configures the shapetemplate.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(editable =&gt; editable.ShapeTemplateHandler("getShapeEditorTemplate"))
)

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 value)
Parameters:valuestring

The value that configures the shapetemplate.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(editable =&gt; editable.ShapeTemplateId("shapeEditorTemplate"))
)

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>

Example:
C#
@(Html.Kendo().Diagram()
.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(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the shapetemplate.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Editable(editable =&gt; editable.ShapeTemplateView(Html.Partial("ShapteTemplateView")))
)

Specifies the toolbar tools.

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

The action that configures the tools.

Returns:

DiagramEditableSettingsBuilder<TShapeModel, TConnectionModel>