Drawer
Kendo UI Drawer component
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class Drawer : WidgetBase, IWidget, IHtmlAttributesContainer, IScriptableComponent
Inheritance: objectWidgetBaseDrawer
Implements:
Inherited Members
Constructors
Initializes a new instance of the Drawer class.
public Drawer(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
The view context
initializerIJavaScriptInitializerThe JavaScriptInitializer
urlGeneratorIUrlGeneratorThe URL generator.
Properties
Specifies if the Drawer will be automatically collapsed when an item is clicked.
public bool? AutoCollapse { get; set; }
The HTML string representing the associated content for the Drawer widget
public HtmlTemplate Content { get; }
Specifies if the Drawer will be expanded by default.
public bool? Expanded { get; set; }
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.
public List<DrawerItem> Items { get; set; }
Specifies the minimum height for the drawer in push mode. The overlay mode takes 100% of the page height.
public double? MinHeight { get; set; }
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.
public DrawerMiniSettings Mini { get; set; }
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.
public string Mode { get; set; }
If set to true the use could navigate the widget using the keyboard navigation. By default keyboard navigation is disabled.
public bool? Navigatable { get; set; }
The position of the drawer. Can be left (default) or right.
public string Position { get; set; }
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.
public bool? SwipeToOpen { get; set; }
Specifies the drawer's content. When configured, it takes precedence over items.
public string Template { get; set; }
The handler for the Template
public string TemplateHandler { get; set; }
The id for the Template
public string TemplateId { get; set; }
Methods
public override IDictionary<string, object> Serialize()
Overrides:
Writes the HTML.
protected override void WriteHtml(HtmlTextWriter writer)
The HtmlTextWriter.
Overrides:
Writes the initialization script.
public override void WriteInitializationScript(TextWriter writer)
The TextWriter.
Overrides: