DiagramConnectionContentSettingsBuilder
Methods
Color(System.String)
Defines the color of the connection content text.
Parameters
value - System.String
The value that configures the color.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().Content(c => c.Color("blue"));
})
)
FontFamily(System.String)
Defines the font family of the connection content text.
Parameters
value - System.String
The value that configures the font family.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().Content(c => c.FontFamily("Tahoma"));
})
)
FontSize(System.Double)
Defines the font size of the connection content text.
Parameters
value - System.Double
The value that configures the font size.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().Content(c => c.FontSize(18));
})
)
FontStyle(System.String)
Defines the font style of the connection content text.
Parameters
value - System.String
The value that configures the font style.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().Content(c => c.FontStyle("italic"));
})
)
FontWeight(System.String)
Defines the font weight of the connection content text.
Parameters
value - System.String
The value that configures the font weight.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().Content(c => c.FontWeight("600"));
})
)
Template(System.String)
The template that renders the connection labels.
Parameters
value - System.String
The value that configures the template content.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().Content(c => c.Template("Iteration on #:kendo.toString(new Date(), 'MM/dd/yyyy')#"));
})
)
TemplateId(System.String)
The template that renders the connection labels.
Parameters
value - System.String
The value that configures the template content.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().Content(c => c.TemplateId("connectionLabel"));
})
)
<script id="connectionLabel" type="text/x-kendo-template">
Iteration on #:kendo.toString(new Date(), 'MM/dd/yyyy')#
</script>
TemplateView(System.Web.Mvc.MvcHtmlString)
The template that renders the connection labels.
Parameters
value - System.Web.Mvc.MvcHtmlString
The value that configures the template content.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().Content(c => c.TemplateView(Html.Partial("ConnectionLabelTemplateView")));
})
)
TemplateHandler(System.String)
The template that renders the connection labels.
Parameters
value - System.String
The value that configures the template content.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().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 that renders the connection labels.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the template.
Text(System.String)
Sets the label text displayed for the connection.
Parameters
value - System.String
The value that configures the text content.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().Content(c => c.Text("Step 1"));
})
)
Visual(System.Func)
Defines a JavaScript function that returns a visual element to render the content of the connection.
Parameters
handler - System.Func<Object,Object>
The value that configures the visual action.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().Content(c => c.Visual(@<text>
function(e) {
// Return a custom visual element.
}
</text>));
})
)
Visual(System.String)
Defines a JavaScript function that returns a visual element to render the content of the connection.
Parameters
handler - System.String
The value that configures the visual action.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().Content(c => c.Visual("getConnectionContent"));
})
)
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<DiagramConnectionContentPositionSettingsBuilder>
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<DiagramConnectionContentBorderSettingsBuilder>
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<DiagramConnectionContentPaddingSettingsBuilder>
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.