DiagramShapeDefaultsEditableSettingsToolMenuButtonBuilder
Methods
HtmlAttributes(System.Object)
Specifies the HTML attributes of a menu button of a SplitButton or a DropDownButton.
Parameters
value - System.Object
The value that configures the HTML attributes.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Editable(e => e.Tools(tt => tt.Custom().Name("splitBtn").Type("splitButton").Text("Split button")
.MenuButtons(mb =>
{
mb.Add().Text("Item 1").HtmlAttributes(new { @class = "itemBtn"});
})
))
)
)
HtmlAttributes(System.Collections.Generic.IDictionary)
Specifies the HTML attributes of a menu button of a SplitButton or a DropDownButton.
Parameters
value - System.Collections.Generic.IDictionary<String,Object>
The value that configures the HTML attributes.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Editable(e => e.Tools(tt => tt.Custom().Name("splitBtn").Type("splitButton").Text("Split button")
.MenuButtons(mb =>
{
mb.Add().Text("Item 1").HtmlAttributes(new Dictionary<string, object>() { ["class"] = "itemBtn" });
})
))
)
)
Enable(System.Boolean)
Specifies whether the menu button must be initially enabled or disabled.
Parameters
value - System.Boolean
The value that enables or disables the button.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Editable(e => e.Tools(tt => tt.Custom().Name("splitBtn").Type("splitButton").Text("Split button")
.MenuButtons(mb =>
{
mb.Add().Text("Item 1").Enable(false);
})
))
)
)
Icon(System.String)
Sets an icon for the menu button. The icon must be one of the existing in the Kendo UI theme sprite.
Parameters
value - System.String
The value that configures the icon.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Editable(e => e.Tools(tt => tt.Custom().Name("splitBtn").Type("splitButton").Text("Split button")
.MenuButtons(mb =>
{
mb.Add().Icon("check");
})
))
)
)
Id(System.String)
Specifies the ID of the menu button.
Parameters
value - System.String
The value that configures the id.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Editable(e => e.Tools(tt => tt.Custom().Name("splitBtn").Type("splitButton").Text("Split button")
.MenuButtons(mb =>
{
mb.Add().Id("1").Text("Item 1");
})
))
)
)
ImageUrl(System.String)
Sets an image with a specified URL to be rendered in the menu button.
Parameters
value - System.String
The value that configures the image URL.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Editable(e => e.Tools(tt => tt.Custom().Name("splitBtn").Type("splitButton").Text("Split button")
.MenuButtons(mb =>
{
mb.Add().ImageUrl("/diagram/settings.png");
})
))
)
)
SpriteCssClass(System.String)
Defines a CSS class (or multiple classes separated by spaces) that will be used for menu button's icon.
Parameters
value - System.String
The value that configures the CSS class.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Editable(e => e.Tools(tt => tt.Custom().Name("splitBtn").Type("splitButton").Text("Split button")
.MenuButtons(mb =>
{
mb.Add().Icon("check").SpriteCssClass("tick-icon");
})
))
)
)
Text(System.String)
Specifies the text of the menu button.
Parameters
value - System.String
The value that configures the text.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Editable(e => e.Tools(tt => tt.Custom().Name("splitBtn").Type("splitButton").Text("Split button")
.MenuButtons(mb =>
{
mb.Add().Text("Item 1");
})
))
)
)
Url(System.String)
Specifies the URL of the menu button to navigate to.
Parameters
value - System.String
The value that configures the URL.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Editable(e => e.Tools(tt => tt.Custom().Name("splitBtn").Type("splitButton").Text("Split button")
.MenuButtons(mb =>
{
mb.Add().Text("Item 1").Url("URL value");
})
))
)
)