DiagramConnectionContentSettingsBuilder
Methods
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 name of the Kendo UI external template.
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 Razor View that will be used for rendering the template.
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 JavaScript function that will return 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>
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.String)
Defines a JavaScript function that returns a visual element to render the content of the connection.
Parameters
name - System.String
The name of the JavaScript function.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().Content(c => c.Visual("getConnectionContent"));
})
)
Visual(System.Func)
Defines a JavaScript function that returns a visual element to render the content of the connection.
Parameters
function - System.Func<Object,Object>
The handler code wrapped in a text tag.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(connection =>
{
connection.Add().Content(c => c.Visual(@<text>
function(e) {
// Return a custom visual element.
}
</text>));
})
)
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"));
})
)