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

Defines the fluent API for configuring the DiagramShapeDefaultsContentSettings settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TShapeModel

TConnectionModel

Syntax:

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

Inheritance: objectDiagramShapeDefaultsContentSettingsBuilder<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 DiagramShapeDefaultsContentSettingsBuilder(DiagramShapeDefaultsContentSettings settings)
Parameters:settingsDiagramShapeDefaultsContentSettings

Methods

Defines the default alignment of the text inside the shapes. You can set combinations between "top", "middle" and "bottom" for vertical align and "right", "center" and "left" for horizontal align. For example, "top right", "middle left", "bottom center", and more.

C#
public DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel> Align(string value)
Parameters:valuestring

The value that configures the align.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

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

Defines the default color of the shape content text.

C#
public DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel> Color(string value)
Parameters:valuestring

The value that configures the color.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

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

Defines the default font family of the shape content text.

C#
public DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel> FontFamily(string value)
Parameters:valuestring

The value that configures the font family.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Content(c =&gt; c.FontFamily("Tahoma"))
)
)

Defines the default font size of the shape content text.

C#
public DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel> FontSize(double value)
Parameters:valuedouble

The value that configures the fontsize.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Content(c =&gt; c.FontSize(18))
)
)

Defines the default font style of the shape content text.

C#
public DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel> FontStyle(string value)
Parameters:valuestring

The value that configures the font style.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Content(c =&gt; c.FontStyle("italic"))
)
)

Defines the default font weight of the shape content text.

C#
public DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel> FontWeight(string value)
Parameters:valuestring

The value that configures the font weight.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Content(c =&gt; c.FontWeight("300"))
)
)

The spacing between lines of text in the shape.

C#
public DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel> LineSpacing(double value)
Parameters:valuedouble

The value that configures the line spacing.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

The padding of the shape content.

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

The action that configures the padding.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

The relative padding of the shape content e.g. 0.03 means 3% of the shape width/height.

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

The action that configures the relativepadding.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

Defines the default template that renders the labels.

C#
public DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel> Template(string value)
Parameters:valuestring

The value that configures the template.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Content(c =&gt; c.Template("#=kendo.toString(new Date(), 'dd MMM yyyy')#"))
)
)

Defines the default template that renders the labels.

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

A Template component that configures the template.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

Defines the default template that renders the labels.

C#
public DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel> TemplateHandler(string value)
Parameters:valuestring

The value that configures the template.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Content(c =&gt; c.TemplateHandler("getDefaultContentTemplate"))
)
)

Defines the default template that renders the labels.

C#
public DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel> TemplateId(string value)
Parameters:valuestring

The value that configures the template.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Content(c =&gt; c.TemplateId("shapeContentTemplate"))
)
)

Defines the default template that renders the labels.

C#
public DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel> TemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the template.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Content(c =&gt; c.TemplateView(Html.Partial("DefaultContentTemplateView")))
)
)

The text that is displayed in the shape.

C#
public DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel> Text(string value)
Parameters:valuestring

The value that configures the text.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd =&gt; sd
.Content(c =&gt; c.Text("Day"))
)
)

Configures the text wrapping behavior in the shape. Supported values are "nowrap" and "wrap".

C#
public DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel> TextWrap(ShapeTextWrap value)
Parameters:valueShapeTextWrap

The value that configures the text wrap.

Returns:

DiagramShapeDefaultsContentSettingsBuilder<TShapeModel, TConnectionModel>