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

Defines the fluent API for configuring the DiagramLayoutGridSettings settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TShapeModel

TConnectionModel

Syntax:

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

Inheritance: objectDiagramLayoutGridSettingsBuilder<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 DiagramLayoutGridSettingsBuilder(DiagramLayoutGridSettings settings)
Parameters:settingsDiagramLayoutGridSettings

Methods

Defines the horizontal spacing between each component. The default is 50.

C#
public DiagramLayoutGridSettingsBuilder<TShapeModel, TConnectionModel> ComponentSpacingX(double value)
Parameters:valuedouble

The value that configures the horizontal spacing.

Returns:

DiagramLayoutGridSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Layout(l =&gt; l.Grid(grid =&gt; grid.ComponentSpacingX(80)))
)

Defines the vertical spacing between each component. The default is 50.

C#
public DiagramLayoutGridSettingsBuilder<TShapeModel, TConnectionModel> ComponentSpacingY(double value)
Parameters:valuedouble

The value that configures the vertical spacing.

Returns:

DiagramLayoutGridSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Layout(l =&gt; l.Grid(grid =&gt; grid.ComponentSpacingY(100)))
)

Defines the left offset of the grid layout. The default is 50.

C#
public DiagramLayoutGridSettingsBuilder<TShapeModel, TConnectionModel> OffsetX(double value)
Parameters:valuedouble

The value that configures the left offset.

Returns:

DiagramLayoutGridSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Layout(l =&gt; l.Grid(grid =&gt; grid.OffsetX(100)))
)

Defines the top offset of the grid layout. The default is 50.

C#
public DiagramLayoutGridSettingsBuilder<TShapeModel, TConnectionModel> OffsetY(double value)
Parameters:valuedouble

The value that configures the top offset.

Returns:

DiagramLayoutGridSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Layout(l =&gt; l.Grid(grid =&gt; grid.OffsetY(100)))
)

Defines the width of the grid. The bigger this parameter the more components will be organized in an horizontal row. How many components really depends on your Diagram and the type of layout applied to each component.

C#
public DiagramLayoutGridSettingsBuilder<TShapeModel, TConnectionModel> Width(double value)
Parameters:valuedouble

The value that configures the width.

Returns:

DiagramLayoutGridSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Layout(l =&gt; l.Grid(grid =&gt; grid.Width(1000)))
)