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 name of the Kendo UI external 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 Razor View that will be used for rendering 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 JavaScript function that will return the template content.

Example

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

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

The template which renders the labels.The fields which can be used in the template are: dataItem - The data item if a field has been specified.

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"))
               )
             )