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

DrawerMiniSettingsBuilder

Methods

Width(System.Double)

Defines a specific width for the Drawer when it is in "mini" mode.

Parameters

value - System.Double

The value that configures the width.

Example


             @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Mini(mode => mode.Width(45))
            )

Template(System.String)

Defines a specific template for the Drawer when it is in "mini" mode.

Parameters

value - System.String

The value that configures the template content.

Example


             @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Mini(mode => mode.Template("<ul><li data-role='drawer-item'><span class='k-icon k-i-anchor'></span></li><li data-role='drawer-item'><span class='k-icon k-i-paint'></span></li></ul>"))
            )

TemplateId(System.String)

Defines an external Kendo UI template for the Drawer when it is in "mini" mode.

Parameters

value - System.String

The id of the Kendo UI template.

Example


             @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Mini(mode => mode.TemplateId("drawer-template"))
             )
            <script id="drawer-template" type="text/x-kendo-template">
                <ul>
                  <li data-role='drawer-item'><span class='k-item-text' data-id='item1'>Item 1</span></li>
                  <li data-role='drawer-item'><span class='k-item-text' data-id='item2'>Item 2</span></li>
                </ul>
            </script>

TemplateView(System.Web.Mvc.MvcHtmlString)

Defines a template for the Drawer by using a partial View when it is in "mini" mode.

Parameters

value - System.Web.Mvc.MvcHtmlString

The Razor View that contains the content of the Drawer.

Example


             @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Mini(mode => mode.TemplateView(Html.Partial("DrawerTemplateView")))
            )

TemplateHandler(System.String)

Defines a specific template for the Drawer by using a JavaScript function when in "mini" mode.

Parameters

value - System.String

The JavaScript function that will return the content.

Example


             @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Mini(mode => mode.TemplateHandler("drawerTemplate"))
            )
            <script>
               function drawerTemplate() {
                 return `<ul>
                       <li data-role='drawer-item'><span class='k-item-text' data-id='item1'>Item 1</span></li>
                       <li data-role='drawer-item'><span class='k-item-text' data-id='item2'>Item 2</span></li></ul>`;
                }
            </script>

Template(Kendo.Mvc.UI.TemplateBuilder)

Defines a specific template for the Drawer by using a Template component when the Drawer is in "mini" mode.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the template.

Example


             @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Mini(mode => mode.Template(Html.Kendo().Template().AddHtml("<ul>" +
                    "<li data-role='drawer-item'><span class='k-item-text' data-id='item1'>Item 1</span></li>" +
                    "<li data-role='drawer-item'><span class='k-item-text' data-id='item2'>Item 2</span></li></ul>"))
                    )
            )

In this article
Not finding the help you need?