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

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


             @(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


             @(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


             @(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


             @(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


             @(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


             @(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


             @(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


             @(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


             @(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


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

Text(System.String)

Defines the default text displayed in the shape.

Parameters

value - System.String

The value that configures the text.

Example


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

In this article
Not finding the help you need?