New to Telerik UI for ASP.NET MVC? Download free 30-day trial

FloatingActionButtonBuilder

Methods

Enabled(System.Boolean)

Specifies whether the FloatingActionButton is enabled (true) or disabled (false).

Parameters

value - System.Boolean

The value that configures the enabled state.

Example


            @(Html.Kendo().FloatingActionButton()
                   .Name("fab")
                   .Enabled(false)
            )

Icon(System.String)

Specifies the name for an existing icon in a Kendo UI theme that is rendered in the FloatingActionButton.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")
                   .Icon("plus")
            )

Items(System.Action)

Specifies the speed-dial items that will be rendered in a popup container anchored to the FloatingActionButton.**Note: when using the items configuration, clicking on the FloatingActionButton will open the popup containing the speed-dial list.

Parameters

configurator - System.Action<FloatingActionButtonItemFactory>

The action that configures the items.

Example


            @(Html.Kendo().FloatingActionButton()
                   .Name("fab")
                   .Items(items=>{
                       items.Add().Icon("star").Label("Add Rating");
                       items.Add().Icon("pencil").Label("Add comment");
                   })
            )

Text(System.String)

Specifies the text of the FloatingActionButton. Default is empty string.

Parameters

value - System.String

The value that configures the text.

Example


            @(Html.Kendo().FloatingActionButton()
                   .Name("fab")
                   .Text("Send")
            )

Visible(System.Boolean)

Specifies if the FloatingActionButton is visible initially.

Parameters

value - System.Boolean

The value that configures the visible.

Example


            @(Html.Kendo().FloatingActionButton()
                   .Name("fab")
                   .Visible(false)
            )

PositionMode(Kendo.Mvc.UI.FloatingActionButtonPositionMode)

Defines the type of positioning

Parameters

value - FloatingActionButtonPositionMode

The value that configures the positionmode.

Example


            @(Html.Kendo().FloatingActionButton()
                   .Name("fab")
                   .PositionMode(FloatingActionButtonPositionMode.Absolute)
            )

ThemeColor(Kendo.Mvc.UI.FloatingActionButtonThemeColor)

Specifies the color of the component

Parameters

value - FloatingActionButtonThemeColor

The value that configures the themecolor.

Example


            @(Html.Kendo().FloatingActionButton()
                   .Name("fab")
                   .ThemeColor(FloatingActionButtonThemeColor.Primary)
            )

Size(Kendo.Mvc.UI.FloatingActionButtonSize)

Specifies the size of the component

Parameters

value - FloatingActionButtonSize

The value that configures the size.

Example


            @(Html.Kendo().FloatingActionButton()
                   .Name("fab")
                   .Size(FloatingActionButtonSize.Medium)
            )

Rounded(Kendo.Mvc.UI.FloatingActionButtonRounded)

Sets a value controlling the border radius.

Parameters

value - FloatingActionButtonRounded

The value that configures the rounded.

Example


            @(Html.Kendo().FloatingActionButton()
                   .Name("fab")
                   .Rounded(FloatingActionButtonRounded.Medium)
            )

FillMode(Kendo.Mvc.UI.FloatingActionButtonFillMode)

Sets a value controlling how the color is applied.

Parameters

value - FloatingActionButtonFillMode

The value that configures the fillmode.

Example


            @(Html.Kendo().FloatingActionButton()
                   .Name("fab")
                   .FillMode(FloatingActionButtonFillMode.Solid)
            )

Align(Kendo.Mvc.UI.FloatingActionButtonAlign)

Defines the alignment of the FloatingActionButton

Parameters

value - FloatingActionButtonAlign

The value that configures the align.

Example


            @(Html.Kendo().FloatingActionButton()
                   .Name("fab")
                   .Align(FloatingActionButtonAlign.BottomEnd)
            )

AlignOffset(System.Action)

Defines the alignment offset of the FloatingActionButton

Parameters

configurator - System.Action<FloatingActionButtonAlignOffsetBuilder>

The action that configures the align offset.

Example


            @(Html.Kendo().FloatingActionButton()
                   .Name("fab")
                   .AlignOffset(ao=>ao.Horizontal(50).Vertical(50))
            )

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<FloatingActionButtonEventBuilder>

The client events action.

Example


             @( Html.Kendo().FloatingActionButton()
                        .Name("FloatingActionButton")
                        .Events(events => events
                            .Click("onClick")
                        )
            )

ToComponent()

Returns the internal view component.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name of the component.

Example


            @(Html.Kendo().Grid<OrderViewModel>()
               .Name("grid")
               .Columns(columns =>
               {
                   columns.Bound(p => p.OrderID).Filterable(false);
                   columns.Bound(p => p.Freight);
               })
               .DataSource(dataSource => dataSource
                   .Ajax()
                   .PageSize(20)
                   .Read(read => read.Action("Orders_Read", "Grid"))
               )
            )

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

ModelMetadata(System.Web.Mvc.ModelMetadata)

Uses the Metadata of the Model.

Parameters

modelMetadata - System.Web.Mvc.ModelMetadata

The metadata set for the Model

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean

Render()

Renders the component.

Example


            @(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
            @( Html.Kendo().Grid(Model)
                .Name("grid")
                .DetailTemplate(product => {
                    )
                       Product Details:
                       <div>Product Name: @( product.ProductName )</div>
                       <div>Units In Stock: @( product.UnitsInStock )</div>
                    @(
                })
                .Render();
            )

ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Object

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

ToHtmlString()

ToClientTemplate()

In this article
Not finding the help you need?