DiagramShapeDefaultsContentSettingsBuilder
Methods
Align(System.String)
Defines the default alignment of the text inside the shapes. 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")
.ShapeDefaults(sd => sd
.Content(c => c.Align("top left"))
)
)
Color(System.String)
Defines the default color of the shape content text.
Parameters
value - System.String
The value that configures the color.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Content(c => c.Color("yellow"))
)
)
FontFamily(System.String)
Defines the default font family of the shape content text.
Parameters
value - System.String
The value that configures the font family.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Content(c => c.FontFamily("Tahoma"))
)
)
FontSize(System.Double)
Defines the default font size of the shape content text.
Parameters
value - System.Double
The value that configures the fontsize.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Content(c => c.FontSize(18))
)
)
FontStyle(System.String)
Defines the default font style of the shape content text.
Parameters
value - System.String
The value that configures the font style.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Content(c => c.FontStyle("italic"))
)
)
FontWeight(System.String)
Defines the default font weight of the shape content text.
Parameters
value - System.String
The value that configures the font weight.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Content(c => c.FontWeight("300"))
)
)
Template(System.String)
Defines the default template that renders the labels.
Parameters
value - System.String
The value that configures the template.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Content(c => c.Template("#=kendo.toString(new Date(), 'dd MMM yyyy')#"))
)
)
TemplateId(System.String)
Defines the default template that renders the labels.
Parameters
value - System.String
The name of the Kendo UI external template.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Content(c => c.TemplateId("shapeContentTemplate"))
)
)
TemplateView(System.Web.Mvc.MvcHtmlString)
Defines the default 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")
.ShapeDefaults(sd => sd
.Content(c => c.TemplateView(Html.Partial("DefaultContentTemplateView")))
)
)
TemplateHandler(System.String)
Defines the default template that renders the labels.
Parameters
value - System.String
The JavaScript function that will return the template content.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Content(c => c.TemplateHandler("getDefaultContentTemplate"))
)
)
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 if a field has been specified.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the template.
Text(System.String)
The text that is displayed in the shape.
Parameters
value - System.String
The value that configures the text.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Content(c => c.Text("Day"))
)
)
LineSpacing(System.Double)
The spacing between lines of text in the shape.
Parameters
value - System.Double
The value that configures the linespacing.
Padding(System.Action)
The padding of the shape content.
Parameters
configurator - System.Action<DiagramShapeDefaultsContentPaddingSettingsBuilder>
The action that configures the padding.
RelativePadding(System.Action)
The relative padding of the shape content e.g. 0.03 means 3% of the shape width/height.
Parameters
configurator - System.Action<DiagramShapeDefaultsContentRelativePaddingSettingsBuilder>
The action that configures the relativepadding.
TextWrap(Kendo.Mvc.UI.ShapeTextWrap)
Configures the text wrapping behavior in the shape. Supported values are "nowrap" and "wrap".
Parameters
value - ShapeTextWrap
The value that configures the textwrap.