DiagramConnectionDefaultsContentSettingsBuilder

Methods

Template(System.String)

The default template that renders the connection labels.

Parameters

value - System.String

The value that configures the template.

Example

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

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

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

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

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, in case a field has been specified.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the template.

Text(System.String)

Sets the default static text displayed on the connection.

Parameters

value - System.String

The value that configures the text.

Example

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

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

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

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

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

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

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

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