# DrawerBuilder

## Properties

### WriteAction - Func

## Methods

### Content(System.Action)

Defines the associated content for the Drawer.

#### Parameters

##### value - `System.Action`

The value of the content.

### Content(System.Func)

The HTML string representing the associated content for the Drawer.

#### Parameters

##### value - `System.Func<Object,Object>`

The value wrapped in a text tag.

#### RETURNS

Returns the current instance of [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) to allow method chaining.

#### Example

```
 
             @(Html.Kendo().Drawer()
               .Name("drawer")
               .Content(@<text>
                  <span>Content is here </span>
                  </text>)
             )
             
```

### Content(System.String)

The HTML string representing the associated content for the Drawer.

#### Parameters

##### value - `System.String`

The value of the content.

#### RETURNS

Returns the current instance of [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) to allow method chaining.

#### Example

```
 
             @(Html.Kendo().Drawer()
               .Name("drawer")
               .Content(@"
                  <span>Content is here </span>
                ")
             )
             
```

### Content(Microsoft.AspNetCore.Html.IHtmlContent)

Sets the HTML content of the Drawer from a partial view.

#### Parameters

##### partialView - `Microsoft.AspNetCore.Html.IHtmlContent`

The partial view that provides the HTML content.

#### RETURNS

Returns the current instance of [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) to allow method chaining.

#### Example

```
 
             @(Html.Kendo().Drawer()
               .Name("drawer")
               .Content(Html.Partial("_DrawerContent"))
             )
             
```

### AutoCollapse(System.Boolean)

Specifies if the Drawer will be automatically collapsed when an item is clicked.

#### Parameters

##### value - `System.Boolean`

The value for AutoCollapse

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
               .Name("drawer")
               .AutoCollapse(true)
             )
             
```

### Expanded(System.Boolean)

Specifies if the Drawer will be expanded by default.

#### Parameters

##### value - `System.Boolean`

The value for Expanded

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Expanded(true)
            )
             
```

### Expanded()

Specifies if the Drawer will be expanded by default.

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Expanded(true)
            )
             
```

### Items(System.Action)

Specifies the items rendered by the Drawer when the top-level template option is not set. Each item can define text, icon, state, custom attributes, per-item template functions, and nested child items through items.items. If template is configured, it takes precedence and the items configuration is ignored.

#### Parameters

##### configurator - System.Action<[DrawerItemFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/draweritemfactory)>

The configurator for the items setting.

#### RETURNS

Returns the current instance of [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) .

### Position(System.String)

The position of the drawer. Can be left (default) or right.

#### Parameters

##### value - `System.String`

The value for Position

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Position("right")
            )
             
```

### Mode(System.String)

Determines how the Kendo UI Drawer will interact with the associated content. The default one (overlay) will simply overlap the associated content with overlay effect. On the other hand "push" mode will show the drawer next to associated cotent. The associated content will shrink its content.

#### Parameters

##### value - `System.String`

The value for Mode

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Mode("push")
            )
             
```

### Navigatable(System.Boolean)

If set to true the use could navigate the widget using the keyboard navigation. By default keyboard navigation is disabled.

#### Parameters

##### value - `System.Boolean`

The value for Navigatable

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Navigatable(true)
            )
             
```

### Navigatable()

If set to true the use could navigate the widget using the keyboard navigation. By default keyboard navigation is disabled.

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Navigatable(true)
            )
             
```

### Template(System.String)

Specifies the drawer's content. When configured, it takes precedence over items.

#### Parameters

##### value - `System.String`

The value for Template

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .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>"))
            )
             
```

### TemplateId(System.String)

Specifies the drawer's content. When configured, it takes precedence over items.

#### Parameters

##### templateId - `System.String`

The ID of the template element for Template

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .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(Microsoft.AspNetCore.Html.IHtmlContent)

Specifies the drawer's content. When configured, it takes precedence over items.

#### Parameters

##### templateView - `Microsoft.AspNetCore.Html.IHtmlContent`

The view that contains the template for Template

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .TemplateView(Html.Partial("DrawerTemplateView"))
            )
             
```

### TemplateHandler(System.String)

Specifies the drawer's content. When configured, it takes precedence over items.

#### Parameters

##### templateHandler - `System.String`

The handler that returs the template for Template

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .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)

Specifies the drawer's content. When configured, it takes precedence over items.

#### Parameters

##### template - TemplateBuilder\<TModel>

A Template component that configures the template.

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

### MinHeight(System.Double)

Specifies the minimum height for the drawer in push mode. The overlay mode takes 100% of the page height.

#### Parameters

##### value - `System.Double`

The value for MinHeight

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .MinHeight(300)
            )
             
```

### Mini(System.Action)

Enables or configures the mini mode for the Kendo UI Drawer. This is a compact view that is displayed when the Kendo UI Drawer is collapsed. Usually it used to show only the icons when the drawer content contains icon and text for an item. When set to true it uses the main template.

#### Parameters

##### configurator - System.Action<[DrawerMiniSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerminisettingsbuilder)>

The configurator for the mini setting.

#### RETURNS

Returns the current instance of [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) .

### Mini(System.Boolean)

Enables or configures the mini mode for the Kendo UI Drawer. This is a compact view that is displayed when the Kendo UI Drawer is collapsed. Usually it used to show only the icons when the drawer content contains icon and text for an item. When set to true it uses the main template.

#### Parameters

##### enabled - `System.Boolean`

Enables or disables the mini option.

#### RETURNS

Returns the current instance of [DrawerMiniSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerminisettingsbuilder) .

### SwipeToOpen(System.Boolean)

If set to false, swiping the associated content will not activate the drawer. In this case, the drawer will only be open by calling the show method. should be disabled for browsers, which use side swiping gestures for back/forward navigation, such as iOS Safari. Otherwise, users should swipe from an inner part of the view, and not from the view edge.

#### Parameters

##### value - `System.Boolean`

The value for SwipeToOpen

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .SwipeToOpen(true)
            )
             
```

### Width(System.Double)

Defines a specific width for the Kendo UI Drawer when expanded.

#### Parameters

##### value - `System.Double`

The value for Width

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Width(200)
            )
             
```

### Events(System.Action)

Configures the client-side events.

#### Parameters

##### configurator - System.Action<[DrawerEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawereventbuilder)>

The client events action.

#### RETURNS

Returns the current [DrawerBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/drawerbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Drawer()
                  .Name("Drawer")
                  .Events(events => events
                      .Hide("onHide")
                  )
            )
             
```

### ToComponent()

Returns the internal view component.

#### RETURNS

The  instance that represents the component.

### Expression(System.String)

Sets the name of the component.

#### Parameters

##### modelExpression - `System.String`

The name.

#### RETURNS

Returns the current  instance.

### Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

#### Parameters

##### modelExplorer - `Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer`

The name.

#### RETURNS

Returns the current  instance.

### Name(System.String)

Sets the name of the component.

#### Parameters

##### componentName - `System.String`

The name.

#### RETURNS

Returns the current  instance.

### Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with Kendo.Mvc.UI.Fluent.WidgetFactory.DeferredScripts(System.Boolean,System.Boolean)

#### Parameters

##### deferred - `System.Boolean`

#### RETURNS

Returns a [DeferredWidgetBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/deferredwidgetbuilder) instance.

### HtmlAttributes(System.Object)

Sets the HTML attributes.

#### Parameters

##### attributes - `System.Object`

The HTML attributes.

#### RETURNS

Returns the current  instance.

### HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

#### Parameters

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

The HTML attributes.

#### RETURNS

Returns the current  instance.

### 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.

#### RETURNS

Returns the current  instance.

### 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.

#### RETURNS

Returns the current  instance.

### Render()

Renders the component in place.

### ToHtmlString()

Returns the HTML representation of the component.

### WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

#### Parameters

##### writer - `System.IO.TextWriter`

##### encoder - `System.Text.Encodings.Web.HtmlEncoder`

### ToClientTemplate()

Returns the client template for the component.

### AsModule(System.Boolean)

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

#### Parameters

##### value - `System.Boolean`

#### RETURNS

Returns the current  instance.
