DiagramShapeDefaultsContentSettingsBuilder

Methods

Align(System.String)

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.

Parameters

value - System.String

The value that configures the align.

Example

Razor
 
             @(Html.Kendo().Diagram()
               .Name("diagram")
               .ShapeDefaults(sd => sd
                 .Content(c => c.Align("top left"))
               )
             )
             

Color(System.String)

Defines the default color of the shape content text.

Parameters

value - System.String

The value that configures the color.

Example

Razor
 
             @(Html.Kendo().Diagram()
               .Name("diagram")
               .ShapeDefaults(sd => sd
                 .Content(c => c.Color("yellow"))
               )
             )
             

FontFamily(System.String)

Defines the default font family of the shape content text.

Parameters

value - System.String

The value that configures the font family.

Example

Razor
 
             @(Html.Kendo().Diagram()
               .Name("diagram")
               .ShapeDefaults(sd => sd
                 .Content(c => c.FontFamily("Tahoma"))
               )
             )
             

FontSize(System.Double)

Defines the default font size of the shape content text.

Parameters

value - System.Double

The value that configures the fontsize.

Example

Razor
 
             @(Html.Kendo().Diagram()
               .Name("diagram")
               .ShapeDefaults(sd => sd
                 .Content(c => c.FontSize(18))
               )
             )
             

FontStyle(System.String)

Defines the default font style of the shape content text.

Parameters

value - System.String

The value that configures the font style.

Example

Razor
 
             @(Html.Kendo().Diagram()
               .Name("diagram")
               .ShapeDefaults(sd => sd
                 .Content(c => c.FontStyle("italic"))
               )
             )
             

FontWeight(System.String)

Defines the default font weight of the shape content text.

Parameters

value - System.String

The value that configures the font weight.

Example

Razor
 
             @(Html.Kendo().Diagram()
               .Name("diagram")
               .ShapeDefaults(sd => sd
                 .Content(c => c.FontWeight("300"))
               )
             )
             

Template(System.String)

Defines the default template that renders the labels.

Parameters

value - System.String

The value that configures the template.

Example

Razor
 
             @(Html.Kendo().Diagram()
               .Name("diagram")
               .ShapeDefaults(sd => sd
                 .Content(c => c.Template("#=kendo.toString(new Date(), 'dd MMM yyyy')#"))
               )
             )
             

TemplateId(System.String)

Defines the default template that renders the labels.

Parameters

value - System.String

The value that configures the template.

Example

Razor
 
             @(Html.Kendo().Diagram()
               .Name("diagram")
               .ShapeDefaults(sd => sd
                 .Content(c => c.TemplateId("shapeContentTemplate"))
               )
             )
             

TemplateView(System.Web.Mvc.MvcHtmlString)

Defines the default template that renders the labels.

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the template.

Example

Razor
 
             @(Html.Kendo().Diagram()
               .Name("diagram")
               .ShapeDefaults(sd => sd
                 .Content(c => c.TemplateView(Html.Partial("DefaultContentTemplateView")))
               )
             )
             

TemplateHandler(System.String)

Defines the default template that renders the labels.

Parameters

value - System.String

The value that configures the template.

Example

Razor
 
             @(Html.Kendo().Diagram()
               .Name("diagram")
               .ShapeDefaults(sd => sd
                 .Content(c => c.TemplateHandler("getDefaultContentTemplate"))
               )
             )
             

Template(Kendo.Mvc.UI.Fluent.TemplateBuilder)

Defines the default template that renders the labels.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the template.

Text(System.String)

The text that is displayed in the shape.

Parameters

value - System.String

The value that configures the text.

Example

Razor
 
             @(Html.Kendo().Diagram()
               .Name("diagram")
               .ShapeDefaults(sd => sd
                 .Content(c => c.Text("Day"))
               )
             )
             

LineSpacing(System.Double)

The spacing between lines of text in the shape.

Parameters

value - System.Double

The value that configures the line spacing.

Padding(System.Action)

The padding of the shape content.

Parameters

configurator - System.Action<DiagramShapeDefaultsContentPaddingSettingsBuilder>

The action that configures the padding.

RelativePadding(System.Action)

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

Parameters

configurator - System.Action<DiagramShapeDefaultsContentRelativePaddingSettingsBuilder>

The action that configures the relativepadding.

TextWrap(Kendo.Mvc.UI.ShapeTextWrap)

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

Parameters

value - ShapeTextWrap

The value that configures the text wrap.