Inheritance
System.Object
SidebarBuilder
Assembly: Syncfusion.EJ2.dll
public class SidebarBuilder : ControlBuilder
Constructors
Declaration
Declaration
public SidebarBuilder(Sidebar model)
Parameters
Type |
Name |
Description |
Sidebar |
model |
|
Fields
Declaration
Field Value
Properties
Declaration
public IDictionary<string, object> HtmlAttr { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
Declaration
public string ID { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
public override TextWriter Output { get; set; }
Property Value
Type |
Description |
System.IO.TextWriter |
|
Overrides
Methods
Enable or disable the animation transitions on expanding or collapsing the Sidebar.
Declaration
public SidebarBuilder Animate(bool animate = true)
Parameters
Type |
Name |
Description |
System.Boolean |
animate |
|
Returns
Triggers when the state(expand/collapse) of the component is changed.
Declaration
public SidebarBuilder Change(string change)
Parameters
Type |
Name |
Description |
System.String |
change |
|
Returns
Triggers when component is closed.
Declaration
public SidebarBuilder Close(string close)
Parameters
Type |
Name |
Description |
System.String |
close |
|
Returns
Specifies whether the Sidebar need to be closed or not when document area is clicked.
Declaration
public SidebarBuilder CloseOnDocumentClick(bool closeOnDocumentClick = true)
Parameters
Type |
Name |
Description |
System.Boolean |
closeOnDocumentClick |
|
Returns
Declaration
public SidebarBuilder ContentTemplate(Action<object> template)
Parameters
Type |
Name |
Description |
System.Action<System.Object> |
template |
|
Returns
Declaration
public SidebarBuilder ContentTemplate(Func<object, object> template)
Parameters
Type |
Name |
Description |
System.Func<System.Object, System.Object> |
template |
|
Returns
Triggers when component is created.
Declaration
public SidebarBuilder Created(string created)
Parameters
Type |
Name |
Description |
System.String |
created |
|
Returns
Triggers when component gets destroyed.
Declaration
public SidebarBuilder Destroyed(string destroyed)
Parameters
Type |
Name |
Description |
System.String |
destroyed |
|
Returns
Specifies the size of the Sidebar in dock state.
For more details about dockSize refer to
Dock
documentation.
Declaration
public SidebarBuilder DockSize(double dockSize)
Parameters
Type |
Name |
Description |
System.Double |
dockSize |
|
Returns
Specifies the size of the Sidebar in dock state.
For more details about dockSize refer to
Dock
documentation.
Declaration
public SidebarBuilder DockSize(string dockSize)
Parameters
Type |
Name |
Description |
System.String |
dockSize |
|
Returns
Specifies the docking state of the component.
For more details about enableDock refer to
Dock
documentation.
Declaration
public SidebarBuilder EnableDock(bool enableDock = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableDock |
|
Returns
Enables the expand or collapse while swiping in touch devices.
Declaration
public SidebarBuilder EnableGestures(bool enableGestures = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableGestures |
|
Returns
Enable or disable persisting component's state between page reloads. If enabled, following list of states will be persisted.
- Position
- Type
Declaration
public SidebarBuilder EnablePersistence(bool enablePersistence = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enablePersistence |
|
Returns
Specifies the Sidebar in RTL mode that displays the content in the right-to-left direction.
Declaration
public SidebarBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
Allows additional HTML attributes such as title, name, etc., and
accepts n number of attributes in a key-value pair format.
Declaration
public SidebarBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
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 SidebarBuilder IsOpen(bool isOpen = true)
Parameters
Type |
Name |
Description |
System.Boolean |
isOpen |
|
Returns
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 SidebarBuilder MediaQuery(string mediaQuery)
Parameters
Type |
Name |
Description |
System.String |
mediaQuery |
|
Returns
Triggers when component is opened.
Declaration
public SidebarBuilder Open(string open)
Parameters
Type |
Name |
Description |
System.String |
open |
|
Returns
Specifies the position of the Sidebar (Left/Right) corresponding to the main content.
For more details about SidebarPosition refer to
position
documentation.
Declaration
public SidebarBuilder Position(SidebarPosition position)
Parameters
Returns
Declaration
public HtmlString Render()
Returns
Type |
Description |
Microsoft.AspNetCore.Html.HtmlString |
|
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 SidebarBuilder ShowBackdrop(bool showBackdrop = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showBackdrop |
|
Returns
Allows to place the sidebar inside the target element.
For more details about target refer to
Custom Context
documentation.
Declaration
public SidebarBuilder Target(string target)
Parameters
Type |
Name |
Description |
System.String |
target |
|
Returns
Specifies the expanding types of the Sidebar.
Over
- The sidebar floats over the main content area.
Push
- The sidebar pushes the main content area to appear side-by-side, and shrinks the main content within the screen width.
Slide
- The sidebar translates the x and y positions of main content area based on the sidebar width.
The main content area will not be adjusted within the screen width.
Auto
- Sidebar with Over
type in mobile resolution and Push
type in other higher resolutions.
For more details about SidebarType refer to
SidebarType
documentation.
Declaration
public SidebarBuilder Type(SidebarType type)
Parameters
Returns
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 SidebarBuilder Width(double width)
Parameters
Type |
Name |
Description |
System.Double |
width |
|
Returns
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 SidebarBuilder Width(string width)
Parameters
Type |
Name |
Description |
System.String |
width |
|
Returns
Specifies the z-index of the Sidebar. It is applicable only when sidebar act as overlay type.
Declaration
public SidebarBuilder ZIndex(double zIndex)
Parameters
Type |
Name |
Description |
System.Double |
zIndex |
|
Returns