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

Defines the fluent API for configuring the DiagramShapeDefaultsSettings settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TShapeModel

TConnectionModel

Syntax:

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

Inheritance: objectDiagramShapeDefaultsSettingsBuilder<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 DiagramShapeDefaultsSettingsBuilder(DiagramShapeDefaultsSettings settings)
Parameters:settingsDiagramShapeDefaultsSettings

Methods

Defines accessibility options for shapes.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Accessibility(Action<DiagramShapeDefaultsAccessibilitySettingsBuilder<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramShapeDefaultsAccessibilitySettingsBuilder<TShapeModel, TConnectionModel>>

The action that configures the accessibility.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Defines the center position of the shape. Applicable for the circle shape.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Center(Action<DiagramShapeDefaultsCenterSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramShapeDefaultsCenterSettingsBuilder<TShapeModel, TConnectionModel>>

The action that configures the center.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Defines the default options for the shape connectors.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> ConnectorDefaults(Action<DiagramShapeDefaultsConnectorDefaultsSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramShapeDefaultsConnectorDefaultsSettingsBuilder<TShapeModel, TConnectionModel>>

The action that configures the default shape connectors options.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Defines the connectors the shape owns. A connector is the point in the shape where a connection between this shape and another one can originate from or end.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Connectors(Action<DiagramShapeDefaultsSettingsConnectorFactory<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramShapeDefaultsSettingsConnectorFactory<TShapeModel, TConnectionModel>>

The action that configures the connectors.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Defines the default shapes content settings.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Content(Action<DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>>

The action that configures the content settings.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Content(c =&gt; c.FontSize(16).Align("top left").Color("yellow"))
)
)

Defines the corner radius of the shape.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> CornerRadius(double value)
Parameters:valuedouble

The value that configures the corner radius.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Defines the shape editable options.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Editable(Action<DiagramShapeDefaultsEditableSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramShapeDefaultsEditableSettingsBuilder<TShapeModel, TConnectionModel>>

The action that configures the editable settings.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Editable(e =&gt; e.Connect(false).Tools(tt =&gt; tt.Delete()))
)
)

Defines the shape editable options.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Editable(bool enabled)
Parameters:enabledbool

The value that enables or disables the shape editing.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Editable(false)
)
)

Defines the fill options of the shape. Use this option to apply a single-color or a gradient background to all shapes in the Diagram.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Fill(Action<DiagramShapeDefaultsFillSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramShapeDefaultsFillSettingsBuilder<TShapeModel, TConnectionModel>>

The action that configures the fill settings.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Fill(f =&gt; f.Color("lime").Opacity(0.5))
)
)

Defines the default height of shapes in the Diagram.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Height(double value)
Parameters:valuedouble

The value that configures the height.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Height(150)
)
)

Defines the default hover settings.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Hover(Action<DiagramShapeDefaultsHoverSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramShapeDefaultsHoverSettingsBuilder<TShapeModel, TConnectionModel>>

The action that configures the hover settings.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Hover(h =&gt; h.Fill(f =&gt; f.Color("pink")))
)
)

Defines the minimum height the shape can have. Use this option to apply a lower limit to the height of shapes when users resize them.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> MinHeight(double value)
Parameters:valuedouble

The value that configures the minimum height.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.MinHeight(50)
)
)

Defines the minimum width the shape can have. Use this option to apply a lower limit to the width of shapes when users resize them.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> MinWidth(double value)
Parameters:valuedouble

The value that configures the minimum width.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.MinWidth(50)
)
)

Sets the path option of the shapes, which is a description of a custom geometry. The format follows the standard SVG format (http://www.w3.org/TR/SVG/paths.html#PathData "SVG Path data.").

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Path(string value)
Parameters:valuestring

The value that configures the path.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Path("m35.15,0 L84.85,0 L120,35.15 L120,84.85 L84.85,120 L35.15,120 L0,84.85 L0,35.15 z")
)
)

Defines the radius of the shape. Applicable for the circle shape.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Radius(double value)
Parameters:valuedouble

The value that configures the radius.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Defines the default rotation of the shapes.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Rotation(Action<DiagramShapeDefaultsRotationSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramShapeDefaultsRotationSettingsBuilder<TShapeModel, TConnectionModel>>

The action that configures the rotation.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Rotation(r =&gt; r.Angle(45))
)
)

Specifies if Diagram shapes can be selected.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Selectable(bool value)
Parameters:valuebool

The value that configures the selectable.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Selectable(false)
)
)

Sets the path/URL to the shape image. The option applies when the shape type is "image".

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Source(string value)
Parameters:valuestring

The value that configures the source.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Source("image source value").Type("image")
)
)

Defines the configuration of the border around Diagram shapes.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Stroke(Action<DiagramShapeDefaultsStrokeSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramShapeDefaultsStrokeSettingsBuilder<TShapeModel, TConnectionModel>>

The action that configures the stroke.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Stroke(s =&gt; s.Width(4).Color("yellow"))
)
)

Specifies the type of the Diagram Shape using any of the built-in shape type. rectangle: this is the default option; circle: a circle/ellipse; image: an image or text: some text.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Type(DiagramShapeType value)
Parameters:valueDiagramShapeType

The value for Type

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current DiagramShapeBuilder<TShapeModel, TConnectionModel> instance.

Specifies the type of the Workflow Shape type using any of the built-in shape types. Terminator: Start and end points of the workflow.; Process: Standard processing steps or actions.; Decision: Decision points with Yes/No or True/False branches.; Document: Document creation or data output.; PredefinedProcess: Subroutines or predefined operations.; Database:Database operations or data storage.; Delay:Wait periods or time-based operations. or ManualOperation:Manual tasks requiring human intervention.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Type(FlowchartShapeType value)
Parameters:valueFlowchartShapeType

The value for Type

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Returns the current DiagramShapeDefaultsSettings<TShapeModel, TConnectionModel> instance.

Specifies the type of the Shape using any of the built-in shape type. rectangle: this is the default option; circle: a circle/ellipse; image: an image or text: some text. Or common workflow shapes as: Terminator: Start and end points of the workflow.; Process: Standard processing steps or actions.; Decision: Decision points with Yes/No or True/False branches.; Document: Document creation or data output.; PredefinedProcess: Subroutines or predefined operations.; Database:Database operations or data storage.; Delay:Wait periods or time-based operations. or ManualOperation:Manual tasks requiring human intervention..

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Type(string value)
Parameters:valuestring

The value that configures the type.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Type("circle")
)
)

Defines a JavaScript function that returns a visual element to render for a given shape.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Visual(Func<object, object> inlineCodeBlock)
Parameters:inlineCodeBlockFunc<object, object>

The handler code wrapped in a text tag (Razor syntax).

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Visual(@&lt;text&gt;
function(e) {
// Return a custom visual element.
}
&lt;/text&gt;)
)
)

Defines a JavaScript function that returns a visual element to render for a given shape.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Visual(string visualHandler)
Parameters:visualHandlerstring

The name of the JavaScript function that will create the visual element.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Visual("getShapeElement")
)
)

Defines the default width of shapes in the Diagram.

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

The value that configures the width.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Width(150)
)
)

Defines the x-coordinate of the shapes added to the Diagram.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> X(double value)
Parameters:valuedouble

The value that configures the x-coordinate.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.X(100).Y(20)
)
)

Defines the y-coordinate of shapes added to the Diagram.

C#
public DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel> Y(double value)
Parameters:valuedouble

The value that configures the y-coordinate.

Returns:

DiagramShapeDefaultsSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.X(100).Y(20)
)
)