ToolBarItemMenuButtonBuilder
Methods
HtmlAttributes(System.Collections.Generic.IDictionary)
Specifies the HTML attributes of a menu button.
Parameters
value - System.Collections.Generic.IDictionary<String,Object>
The value for HtmlAttributes
RETURNS
Returns the current ToolBarItemMenuButtonBuilder instance.
Example
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Items(items =>
{
items.Add().MenuButtons(m => m.Add().HtmlAttributes(new Dictionary<string, object>
{
{ "class", "custom-button" },
{ "id", "customButtonId" },
{ "data-role", "button" }
});
})
)
HtmlAttributes(System.Object)
Specifies the HTML attributes of a menu button.
Parameters
value - System.Object
The value for HtmlAttributes
RETURNS
Returns the current ToolBarItemMenuButtonBuilder instance.
Enable(System.Boolean)
Specifies whether the menu button is initially enabled or disabled.
Parameters
value - System.Boolean
The value for Enable
RETURNS
Returns the current ToolBarItemMenuButtonBuilder instance.
Example
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Items(items =>
{
items.Add().MenuButtons(m => m.Add().Enable(true));
})
)
Hidden(System.Boolean)
Determines if a button is visible or hidden. By default buttons are visible.
Parameters
value - System.Boolean
The value for Hidden
RETURNS
Returns the current ToolBarItemMenuButtonBuilder instance.
Example
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Items(items =>
{
items.Add().MenuButtons(m => m.Add().Hidden(true));
})
)
Hidden()
Determines if a button is visible or hidden. By default buttons are visible.
RETURNS
Returns the current ToolBarItemMenuButtonBuilder instance.
Example
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Items(items =>
{
items.Add().MenuButtons(m => m.Add().Hidden(true));
})
)
Icon(System.String)
Sets icon for the menu buttons. The icon should be one of the existing in the Kendo UI theme sprite.
Parameters
value - System.String
The value for Icon
RETURNS
Returns the current ToolBarItemMenuButtonBuilder instance.
Example
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Items(items =>
{
items.Add().MenuButtons(m => m.Add().Icon("gear"));
})
)
Id(System.String)
Specifies the ID of the menu buttons.
Parameters
value - System.String
The value for Id
RETURNS
Returns the current ToolBarItemMenuButtonBuilder instance.
Example
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Items(items =>
{
items.Add().MenuButtons(m => m.Add().Id("id"));
})
)
ImageUrl(System.String)
If set, the ToolBar will render an image with the specified URL in the menu button.
Parameters
value - System.String
The value for ImageUrl
RETURNS
Returns the current ToolBarItemMenuButtonBuilder instance.
Example
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Items(items =>
{
items.Add().MenuButtons(m => m.Add().ImageUrl("imageUrl"));
})
)
SpriteCssClass(System.String)
Defines a CSS class (or multiple classes separated by spaces) which will be used for menu button icon.
Parameters
value - System.String
The value for SpriteCssClass
RETURNS
Returns the current ToolBarItemMenuButtonBuilder instance.
Example
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Items(items =>
{
items.Add().MenuButtons(m => m.Add().SpriteCssClass("k-icon k-font-icon k-i-refresh"));
})
)
Text(System.String)
Specifies the text of the menu buttons.
Parameters
value - System.String
The value for Text
RETURNS
Returns the current ToolBarItemMenuButtonBuilder instance.
Example
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Items(items =>
{
items.Add().MenuButtons(m => m.Add().Text("menuButtonText"));
})
)
Url(System.String)
Specifies the url of the menu button to navigate to.
Parameters
value - System.String
The value for Url
RETURNS
Returns the current ToolBarItemMenuButtonBuilder instance.
Example
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Items(items =>
{
items.Add().MenuButtons(m => m.Add().Url("menuButtonUrl"));
})
)