DiagramConnectionDefaultsContentSettingsBuilder
Methods
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"))
)
)
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')#"))
)
)
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>))
)
)
Position(System.Action)
Defines the position of the label relative to the connection path. Can be set to "inline" to position the label along the connection path, or an object with vertical and horizontal properties.
Parameters
configurator - System.Action<DiagramConnectionDefaultsContentPositionSettingsBuilder>
The action that configures the position.
Background(System.String)
The background color of the connection label. Accepts valid CSS colors.
Parameters
value - System.String
The value that configures the background.
Border(System.Action)
The border options of the connection label. Applicable when background is set.
Parameters
configurator - System.Action<DiagramConnectionDefaultsContentBorderSettingsBuilder>
The action that configures the border.
Padding(System.Action)
The padding options of the connection label. Applicable when background or border is set.
Parameters
configurator - System.Action<DiagramConnectionDefaultsContentPaddingSettingsBuilder>
The action that configures the padding.
Offset(System.Double)
Defines the distance (in pixels) between the label and the connection path.
Parameters
value - System.Double
The value that configures the offset.
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>