Class Sidebar
Inherited Members
Namespace: Syncfusion.EJ2.Navigations
Assembly: Syncfusion.EJ2.dll
Syntax
public class Sidebar : EJTagHelper
Constructors
Sidebar()
Declaration
public Sidebar()
Properties
Animate
Enable or disable the animation transitions on expanding or collapsing the Sidebar.
Declaration
[HtmlAttributeName("animate")]
public bool Animate { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
Change
Triggers when the state(expand/collapse) of the component is changed.
Declaration
[HtmlAttributeName("change")]
public string Change { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Close
Triggers when component is closed.
Declaration
[HtmlAttributeName("close")]
public string Close { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
CloseOnDocumentClick
Specifies whether the Sidebar need to be closed or not when document area is clicked.
Declaration
[HtmlAttributeName("closeOnDocumentClick")]
public bool CloseOnDocumentClick { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
ContentTemplate
To get or set value for ContentTemplate.
Declaration
public MvcTemplate<object> ContentTemplate { get; set; }
Property Value
Type | Description |
---|---|
MvcTemplate<System.Object> |
Created
Triggers when component is created.
Declaration
[HtmlAttributeName("created")]
public string Created { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Destroyed
Triggers when component gets destroyed.
Declaration
[HtmlAttributeName("destroyed")]
public string Destroyed { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
DockSize
Specifies the size of the Sidebar in dock state.
For more details about dockSize refer to
Dock
documentation.
Declaration
[HtmlAttributeName("dockSize")]
public string DockSize { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "auto" |
EnableDock
Specifies the docking state of the component.
For more details about enableDock refer to
Dock
documentation.
Declaration
[HtmlAttributeName("enableDock")]
public bool EnableDock { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
EnableGestures
Enables the expand or collapse while swiping in touch devices.
Declaration
[HtmlAttributeName("enableGestures")]
public bool EnableGestures { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
EnablePersistence
Enable or disable persisting component's state between page reloads. If enabled, following list of states will be persisted.
- Position
- Type
Declaration
[HtmlAttributeName("enablePersistence")]
public bool EnablePersistence { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
EnableRtl
Specifies the Sidebar in RTL mode that displays the content in the right-to-left direction.
Declaration
[HtmlAttributeName("enableRtl")]
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
HtmlAttributes
Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.
Declaration
[HtmlAttributeName("htmlAttributes")]
public object HtmlAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
IsOpen
Gets or sets the Sidebar component is open or close.
When the Sidebar type is set to
Auto
, the component will be expanded in the desktop and collapsed in the mobile mode regardless of the isOpen property.
Declaration
[HtmlAttributeName("isOpen")]
public bool IsOpen { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
MediaQuery
Specifies the media query string for resolution, which when met opens the Sidebar.
For more details about mediaQuery refer to
Auto Close
documentation.
Declaration
[HtmlAttributeName("mediaQuery")]
public string MediaQuery { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Open
Triggers when component is opened.
Declaration
[HtmlAttributeName("open")]
public string Open { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Position
Specifies the position of the Sidebar (Left/Right) corresponding to the main content.
For more details about SidebarPosition refer to
position
documentation.
Declaration
[HtmlAttributeName("position")]
public SidebarPosition Position { get; set; }
Property Value
Type | Description |
---|---|
SidebarPosition | The default value is SidebarPosition.Left |
ShowBackdrop
Specifies the whether to apply overlay options to main content when the Sidebar is in an open state.
For more details about showBackdrop refer to
Backdrop
documentation.
Declaration
[HtmlAttributeName("showBackdrop")]
public bool ShowBackdrop { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
Target
Allows to place the sidebar inside the target element.
For more details about target refer to
Custom Context
documentation.
Declaration
[HtmlAttributeName("target")]
public string Target { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Type
Declaration
[HtmlAttributeName("type")]
public SidebarType Type { get; set; }
Property Value
Type | Description |
---|---|
SidebarType | The default value is SidebarType.Auto |
Width
Specifies the width of the Sidebar. By default, the width of the Sidebar sets based on the size of its content. Width can also be set in pixel values.
Declaration
[HtmlAttributeName("width")]
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "auto" |
ZIndex
Specifies the z-index of the Sidebar. It is applicable only when sidebar act as overlay type.
Declaration
[HtmlAttributeName("zIndex")]
public double ZIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 1000 |