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

Defines the fluent API for configuring the DiagramEditableDragSettings settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TShapeModel

TConnectionModel

Syntax:

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

Inheritance: objectDiagramEditableDragSettingsBuilder<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 DiagramEditableDragSettingsBuilder(DiagramEditableDragSettings settings)
Parameters:settingsDiagramEditableDragSettings

Methods

Specifies the shapes drag snap options. By default, during dragging, the shapes move by a given number of pixels at once. You can disable this behavior to make shapes movement smooth or you can specify a different number for the drag snap size to simulate a snap-to-grid functionality.

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

The action that configures the snap settings.

Returns:

DiagramEditableDragSettingsBuilder<TShapeModel, TConnectionModel>

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

Specifies the shapes drag snap options. By default, during dragging, the shapes move by a given number of pixels at once. You can disable this behavior to make shapes movement smooth or you can specify a different number for the drag snap size to simulate a snap-to-grid functionality.

C#
public DiagramEditableDragSettingsBuilder<TShapeModel, TConnectionModel> Snap(bool enabled)
Parameters:enabledbool

The value that enables or disables the snap option.

Returns:

DiagramEditableDragSettingsBuilder<TShapeModel, TConnectionModel>

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