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

DiagramConnectionDefaultsContentSettingsBuilder

Methods

Template(System.String)

The default template that renders the connection labels.

Parameters

value - System.String

The value that configures the template.

Example


             @(Html.Kendo().Diagram()
              .Name("diagram")
              .ConnectionDefaults(cd => cd
                .Content(c => c.Template("Iteration on #:kendo.toString(new Date(), 'MM/dd/yyyy')#"))
               )
             )

TemplateId(System.String)

The default template that renders the connection labels.

Parameters

value - System.String

The name of the Kendo UI external template.

Example


             @(Html.Kendo().Diagram()
              .Name("diagram")
              .ConnectionDefaults(cd => cd
                .Content(c => c.TemplateId("defaultConnectionLabel"))
               )
             )
             <script id="defaultConnectionLabel" type="text/x-kendo-template">
                Iteration on #:kendo.toString(new Date(), 'MM/dd/yyyy')#
             </script>

TemplateView(System.Web.Mvc.MvcHtmlString)

The default template that renders the connection labels.

Parameters

value - System.Web.Mvc.MvcHtmlString

The Razor View that will be used for rendering the template.

Example


             @(Html.Kendo().Diagram()
              .Name("diagram")
              .ConnectionDefaults(cd => cd
                .Content(c => c.TemplateView(Html.Partial("DefaultLabelTemplateView")))
               )
             )

TemplateHandler(System.String)

The default template that renders the connection labels.

Parameters

value - System.String

The JavaScript function that will return the template content.

Example


             @(Html.Kendo().Diagram()
              .Name("diagram")
              .ConnectionDefaults(cd => cd
                .Content(c => c.TemplateHandler("getLabelTemplate"))
               )
             )
            <script>
                function getLabelTemplate() {
                    return `Iteration on ${kendo.toString(new Date(), 'MM/dd/yyyy')}`;
                }
            </script>

Text(System.String)

Sets the default static text displayed on the connection.

Parameters

value - System.String

The value that configures the text.

Example


             @(Html.Kendo().Diagram()
              .Name("diagram")
              .ConnectionDefaults(cd => cd
                .Content(c => c.Text("Step"))
               )
             )

Visual(System.String)

Defines a JavaScript function that returns a visual element to render the default content of the connection.

Parameters

name - System.String

The name of the JavaScript function.

Example


             @(Html.Kendo().Diagram()
              .Name("diagram")
              .ConnectionDefaults(cd => cd
                .Content(c => c.Visual("getConnectionContent"))
               )
             )

Visual(System.Func)

Defines a JavaScript function that returns a visual element to render the default content of the connection.

Parameters

function - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


             @(Html.Kendo().Diagram()
              .Name("diagram")
              .ConnectionDefaults(cd => cd
                .Content(c => c.Visual(@<text>
                  function(e) {
                    // Return a custom visual element.
                  }
                  </text>))
               )
             )

Color(System.String)

Defines the default color of the connection content text.

Parameters

value - System.String

The value that configures the color.

Example


             @(Html.Kendo().Diagram()
              .Name("diagram")
              .ConnectionDefaults(cd => cd
                .Content(c => c.Color("green"))
               )
             )

FontFamily(System.String)

Defines the default font family of the connection content text.

Parameters

value - System.String

The value that configures the font family.

Example


             @(Html.Kendo().Diagram()
              .Name("diagram")
              .ConnectionDefaults(cd => cd
                .Content(c => c.FontFamily("Segoe UI"))
               )
             )

FontSize(System.Double)

Defines the default font size of the connection content text.

Parameters

value - System.Double

The value that configures the font size.

Example


             @(Html.Kendo().Diagram()
              .Name("diagram")
              .ConnectionDefaults(cd => cd
                .Content(c => c.FontSize(16))
               )
             )

FontStyle(System.String)

Defines the default font style of the connection content text.

Parameters

value - System.String

The value that configures the font style.

Example


             @(Html.Kendo().Diagram()
              .Name("diagram")
              .ConnectionDefaults(cd => cd
                .Content(c => c.FontStyle("italic"))
               )
             )

FontWeight(System.String)

Defines the default font weight of the connection content text.

Parameters

value - System.String

The value that configures the font weight.

Example


             @(Html.Kendo().Diagram()
              .Name("diagram")
              .ConnectionDefaults(cd => cd
                .Content(c => c.FontWeight("200"))
               )
             )

In this article
Not finding the help you need?