FloatingActionButtonItemBuilder
Methods
Enabled(System.Boolean)
Specifies whether the Item is enabled or not. By default all items are enabled.
Parameters
value - System.Boolean
The value that configures the enabled state of the item.
Example
@(Html.Kendo().FloatingActionButton()
.Name("fab")
.Items(items=>{
items.Add().Icon("star").Enabled(false);
items.Add().Icon("pencil");
})
)
Click(System.Func)
Specifies the click event handler of the speed-dial item.
Parameters
handler - System.Func<Object,Object>
The value that configures the click action.
Example
@(Html.Kendo().FloatingActionButton()
.Name("fab")
.Items(items=>{
items.Add().Icon("star").Click(
@<text>
function(e) {
//event handling code
}
</text>
);
items.Add().Icon("pencil");
})
)
Click(System.String)
Specifies the click event handler of the speed-dial item.
Parameters
handler - System.String
The value that configures the click action.
Example
@(Html.Kendo().FloatingActionButton()
.Name("fab")
.Items(items=>{
items.Add().Icon("star").Click("onItem1Click");
items.Add().Icon("pencil");
})
)
CssClass(System.String)
Specifies a set of CSS classes for the speed-dial item.
Parameters
value - System.String
The value that configures the cssclass.
Example
@(Html.Kendo().FloatingActionButton()
.Name("fab")
.Items(items=>{
items.Add().Icon("star").CssClass("my-custom-class");
items.Add().Icon("pencil");
})
)
Icon(System.String)
Specifies the name for an existing icon in a Kendo UI theme that is rendered in the speed-dial item.See the Web Font Icons help article for more details on Kendo UI icons.
Parameters
value - System.String
The value that configures the icon.
Example
@(Html.Kendo().FloatingActionButton()
.Name("fab")
.Items(items=>{
items.Add().Icon("star");
items.Add().Icon("pencil");
})
)
Label(System.String)
Specifies the label for the speed-dial item.
Parameters
value - System.String
The value that configures the label.
Example
@(Html.Kendo().FloatingActionButton()
.Name("fab")
.Items(items=>{
items.Add().Icon("star").Label("Add Rating");
items.Add().Icon("pencil").Label("Add comment");
})
)
Template(System.String)
Specifies the template used to render the contents of the speed-dial item.The fields which can be used inside the template are: text String - the label of the item (if configured). or icon String - the icon specified for this step (if configured)..
Parameters
value - System.String
The value that configures the template.
Example
@(Html.Kendo().FloatingActionButton()
.Name("fab")
.Items(items=>{
items.Add().Icon("star").Template("#:text#");
items.Add().Icon("pencil");
})
)
TemplateId(System.String)
Specifies the template used to render the contents of the speed-dial item.The fields which can be used inside the template are: text String - the label of the item (if configured). or icon String - the icon specified for this step (if configured)..
Parameters
value - System.String
The value that configures the template.
Example
@(Html.Kendo().FloatingActionButton()
.Name("fab")
.Items(items=>{
items.Add().Icon("star").TemplateId("item1Template");
items.Add().Icon("pencil");
})
)
TemplateView(System.Web.Mvc.MvcHtmlString)
Specifies the template used to render the contents of the speed-dial item.The fields which can be used inside the template are: text String - the label of the item (if configured). or icon String - the icon specified for this step (if configured)..
Parameters
value - System.Web.Mvc.MvcHtmlString
The value that configures the template.
Example
@(Html.Kendo().FloatingActionButton()
.Name("fab")
.Items(items=>{
items.Add().Icon("star").TemplateView(Html.Partial("Item1Template"));
items.Add().Icon("pencil");
})
)
TemplateHandler(System.String)
Specifies the template used to render the contents of the speed-dial item.The fields which can be used inside the template are: text String - the label of the item (if configured). or icon String - the icon specified for this step (if configured)..
Parameters
value - System.String
The value that configures the template.
Example
@(Html.Kendo().FloatingActionButton()
.Name("fab")
.Items(items=>{
items.Add().Icon("star").TemplateHandler("item1TemplateHandler");
items.Add().Icon("pencil");
})
)
Template(Kendo.Mvc.UI.TemplateBuilder)
Specifies the template used to render the contents of the speed-dial item.The fields which can be used inside the template are: text String - the label of the item (if configured). or icon String - the icon specified for this step (if configured)..
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the template.
Example
@(Html.Kendo().FloatingActionButton()
.Name("fab")
.Items(items=>{
items.Add().Icon("star").Template(
Html.Kendo().Template()
.AddHtml("<p> Add comment </p>")
);
items.Add().Icon("pencil");
})
)
Title(System.String)
Specifies the label for the speed-dial item that will be read by assistive technologies.
Parameters
value - System.String
The value that configures the title.
Example
@(Html.Kendo().FloatingActionButton()
.Name("fab")
.Items(items=>{
items.Add().Icon("star").Title("add comment");
items.Add().Icon("pencil");
})
)