Class Sidebar
Inheritance
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
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
public string Change { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Close
Triggers when component is closed.
Declaration
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
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 |
---|
Syncfusion.EJ2.MvcTemplate<System.Object> |
Created
Triggers when component is created.
Declaration
public string Created { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Destroyed
Triggers when component gets destroyed.
Declaration
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
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
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
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
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
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
public object HtmlAttributes { get; set; }
Property Value
Type |
---|
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
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
public string MediaQuery { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Open
Triggers when component is opened.
Declaration
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
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
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
public string Target { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Type
Declaration
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
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
public double ZIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 1000 |