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
Razor
@(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
Razor
@(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 a specific template for the Drawer when it is in "mini" mode.
Parameters
value - System.String
The value that configures the template content.
Example
Razor
@(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 specific template for the Drawer when it is in "mini" mode.
Parameters
value - System.Web.Mvc.MvcHtmlString
The value that configures the template content.
Example
Razor
@(Html.Kendo().Drawer()
.Name("drawer")
.Mini(mode => mode.TemplateView(Html.Partial("DrawerTemplateView")))
)
TemplateHandler(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
Razor
@(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.Fluent.TemplateBuilder)
Defines a specific template for the Drawer when it is in "mini" mode.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the template.