DiagramShapeContentSettingsBuilder
Methods
Align(System.String)
Defines the alignment of the text inside the shape. You can set combinations between "top", "middle" and "bottom" for vertical align and "right", "center" and "left" for horizontal align. For example, "top right", "middle left", "bottom center", and more.
Parameters
value - System.String
The value that configures the align.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape => shape
.Add().Content(c => c.Align("top left"))
)
)
Color(System.String)
Defines the color of the shape content text.
Parameters
value - System.String
The value that configures the color.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape => shape
.Add().Content(c => c.Color("yellow"))
)
)
FontFamily(System.String)
Defines the font family of the shape content text.
Parameters
value - System.String
The value that configures the font family.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape => shape
.Add().Content(c => c.FontFamily("Tahoma"))
)
)
FontSize(System.Double)
Defines the font size of the shape content text.
Parameters
value - System.Double
The value that configures the font size.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape => shape
.Add().Content(c => c.FontSize(16))
)
)
FontStyle(System.String)
Defines the font style of the shape content text.
Parameters
value - System.String
The value that configures the font style.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape => shape
.Add().Content(c => c.FontStyle("italic"))
)
)
FontWeight(System.String)
Defines the font weight of the shape content text.
Parameters
value - System.String
The value that configures the font weight.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape => shape
.Add().Content(c => c.FontWeight("200"))
)
)
Template(System.String)
Defines the template that renders the labels.
Parameters
value - System.String
The value that configures the template.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape => shape
.Add().Content(c => c.Template("Day1 : #=kendo.toString(new Date(), 'dd MMM yyyy')#"))
)
)
TemplateId(System.String)
Defines the template that renders the labels.
Parameters
value - System.String
The name of the Kendo UI external template.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape => shape
.Add().Content(c => c.TemplateId("shapeContentTemplate"))
)
)
TemplateView(System.Web.Mvc.MvcHtmlString)
Defines the template that renders the labels.
Parameters
value - System.Web.Mvc.MvcHtmlString
The Razor View that will be used for rendering the template.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape => shape
.Add().Content(c => c.TemplateView(Html.Partial("ContentTemplateView")))
)
)
TemplateHandler(System.String)
Defines the template that renders the labels.
Parameters
value - System.String
The JavaScript function that will return the template content.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape => shape
.Add().Content(c => c.TemplateHandler("getContentTemplate"))
)
)
Text(System.String)
Defines the text displayed in the shape.
Parameters
value - System.String
The value that configures the text.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape => shape
.Add().Content(c => c.Text("Day 1"))
)
)