Class NavigationDrawer
Represents the sliding panel menu to navigate between major modules of the application. Most of the time the Navigation Drawer will be hidden and can be shown by swiping from any of the four screen edges or button clicks.
Inheritance
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class NavigationDrawer : ContainerControl, IThemeProvider, IVisualStyle
Constructors
NavigationDrawer()
Navigation Drawer class Constructor
Declaration
public NavigationDrawer()
Properties
AnimationDuration
Gets / Sets the Animation Duration for DrawerPanel
Declaration
public int AnimationDuration { get; set; }
Property Value
Type |
---|
System.Int32 |
CanApplyTheme
Gets or sets a value indicating whether a SkinManager theme style has been applied to the control.
Declaration
public bool CanApplyTheme { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true. |
CanOverrideStyle
Gets or sets a value indicating whether control elements styles can be overridden by theme style settings.
Declaration
public bool CanOverrideStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is false. |
Remarks
By default, the control's element styles will not be overridden by theme style settings if the style is set in sample level. If this property is enabled, element style will be overridden by theme style settings event if it is set in sample level. This property should be enabled or disabled before calling the ThemeName property of the control.
ContentViewContainer
Gets the ContentViewer, on which the desired items can be placed.
Declaration
public ContentViewerContainer ContentViewContainer { get; }
Property Value
Type |
---|
ContentViewerContainer |
DrawerFooter
Gets the Footer for the Navigation DrawerPanel
Declaration
public DrawerFooter DrawerFooter { get; }
Property Value
Type |
---|
DrawerFooter |
DrawerHeader
Gets the Header for the Navigation DrawerPanel
Declaration
public DrawerHeader DrawerHeader { get; }
Property Value
Type |
---|
DrawerHeader |
DrawerHeight
Gets/Sets the DrawerPanel Height.
Declaration
public int DrawerHeight { get; set; }
Property Value
Type |
---|
System.Int32 |
DrawerPanelContainer
Gets the DrawerPanel, which displays the navigation items to which you need to jump to.
Declaration
public DrawerViewContainer DrawerPanelContainer { get; }
Property Value
Type |
---|
DrawerViewContainer |
DrawerWidth
Gets/Sets the DrawerPanel Width.
Declaration
public int DrawerWidth { get; set; }
Property Value
Type |
---|
System.Int32 |
IsVisualStyleEnabled
Gets a value indicating whether the visual style based theme is applied to the control. This also indicates whether the theme files are referred from external assemblies or not.
Declaration
public bool IsVisualStyleEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean | Return true, if the visual style based theme is applied to control. Otherwise returns false. |
Items
Gets/Sets the Navigation Menu Items
Declaration
public NavigationDrawerItemCollection Items { get; set; }
Property Value
Type |
---|
NavigationDrawerItemCollection |
Position
Gets/Sets the Sliding postion of DrawerPanel.
Declaration
public SlidePosition Position { get; set; }
Property Value
Type |
---|
SlidePosition |
Style
Gets or sets the style
Declaration
public NavigationDrawerStyle Style { get; set; }
Property Value
Type |
---|
NavigationDrawerStyle |
ThemeName
Gets or sets the theme name of the NavigationDrawer control.
Declaration
public string ThemeName { get; set; }
Property Value
Type |
---|
System.String |
ThemeStyle
Gets or sets the NavigationDrawerVisualStyle value used to customize the appearance of the NavigationDrawer.
Declaration
public NavigationDrawerVisualStyle ThemeStyle { get; set; }
Property Value
Type |
---|
NavigationDrawerVisualStyle |
TouchThreshold
Declaration
public int TouchThreshold { get; set; }
Property Value
Type |
---|
System.Int32 |
Transition
Gets/Sets the Transition type for the DrawerView panel.
Declaration
public Transition Transition { get; set; }
Property Value
Type |
---|
Transition |
Methods
CreateAccessibilityInstance()
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
Type |
---|
System.Windows.Forms.AccessibleObject |
GetActiveThemeName()
Gets the active theme name of the NavigationDrawer control.
Declaration
public string GetActiveThemeName()
Returns
Type | Description |
---|---|
System.String | Returns the active theme name. |
IsDrawerShowing()
To reture whether the DrawerPanel is visible or not
Declaration
public bool IsDrawerShowing()
Returns
Type |
---|
System.Boolean |
OnMouseDown(MouseEventArgs)
Override MouseDown Event
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e |
OnMouseLeave(EventArgs)
Raises the System.Windows.Forms.Control.MouseLeave event.
Declaration
protected override void OnMouseLeave(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An EventArgs that contains the event data. |
OnMouseMove(MouseEventArgs)
Override MouseMove Event
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e |
OnMouseUp(MouseEventArgs)
Override MouseUp Event
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e |
OnSizeChanged(EventArgs)
Override for SizeChanged Event
Declaration
protected override void OnSizeChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
ResetAnimationDuration()
To Reset the Animation Duration
Declaration
public void ResetAnimationDuration()
ResetDrawerHeight()
To Reset the DrawerHeight
Declaration
public void ResetDrawerHeight()
ResetDrawerWidth()
To Reset the Drawer Width
Declaration
public void ResetDrawerWidth()
ResetPosition()
To Reset the Position
Declaration
public void ResetPosition()
ResetTouchThreshold()
To Reset the TouchThreshold
Declaration
public void ResetTouchThreshold()
ResetTransition()
To Reset the Transition type
Declaration
public void ResetTransition()
ShouldSerializeAnimationDuration()
To define whether to serialize Animation Duration
Declaration
public bool ShouldSerializeAnimationDuration()
Returns
Type |
---|
System.Boolean |
ShouldSerializeDrawerHeight()
To define whether to serialize the DrawerHeight
Declaration
public bool ShouldSerializeDrawerHeight()
Returns
Type |
---|
System.Boolean |
ShouldSerializeDrawerWidth()
To define whether to serialize the DrawerWidth
Declaration
public bool ShouldSerializeDrawerWidth()
Returns
Type |
---|
System.Boolean |
ShouldSerializePosition()
To specify whether to serialize Postion or not
Declaration
public bool ShouldSerializePosition()
Returns
Type |
---|
System.Boolean |
ShouldSerializeTouchThreshold()
To define whether to serialize the TouchThreshold
Declaration
public bool ShouldSerializeTouchThreshold()
Returns
Type |
---|
System.Boolean |
ShouldSerializeTransition()
To define whether to serialize Transition type
Declaration
public bool ShouldSerializeTransition()
Returns
Type |
---|
System.Boolean |
ToggleDrawer()
A function used to toggle between open and closed states of the DrawerContentView.
Declaration
public void ToggleDrawer()
UpdateSize()
To update the control size, with respect to Transition type
Declaration
public void UpdateSize()
WndProc(ref Message)
Windows Procedure Override
Declaration
protected override void WndProc(ref Message m)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Message | m |
Events
Closed
Raises when Transition Collapses ends.
Declaration
public event NavigationDrawer.ClosedEventHandler Closed
Event Type
Type |
---|
NavigationDrawer.ClosedEventHandler |
Closing
Raises when Transition collapses begins.
Declaration
public event NavigationDrawer.ClosingEventHandler Closing
Event Type
Type |
---|
NavigationDrawer.ClosingEventHandler |
ItemClicked
Occurs when the Syncfusion.Windows.Forms.Tools.NavigationDrawer.DrawerMenuItem is clicked
Declaration
public event NavigationDrawer.MenuItemClickedEventHandler ItemClicked
Event Type
Type |
---|
NavigationDrawer.MenuItemClickedEventHandler |
Opened
Raises when Transition expands ends.
Declaration
public event NavigationDrawer.OpenedEventHandler Opened
Event Type
Type |
---|
NavigationDrawer.OpenedEventHandler |
Opening
Raises when Transition expands begins.
Declaration
public event NavigationDrawer.OpeningEventHandler Opening
Event Type
Type |
---|
NavigationDrawer.OpeningEventHandler |
ThemeNameChanged
Occurs when theme name of the NavigationDrawer has changed.
Declaration
public event ThemeChangedEventHandler ThemeNameChanged
Event Type
Type |
---|
ThemeChangedEventHandler |
Explicit Interface Implementations
IVisualStyle.VisualTheme
Gets or sets the VisualTheme of the NavigationDrawer control.
Declaration
string IVisualStyle.VisualTheme { get; set; }
Returns
Type |
---|
System.String |
IThemeProvider.BaseThemeName
Gets or sets the BaseTheme name of the theme
Declaration
string IThemeProvider.BaseThemeName { get; set; }
Returns
Type |
---|
System.String |
IThemeProvider.ControlName
Gets the name of the control.
Declaration
string IThemeProvider.ControlName { get; }
Returns
Type |
---|
System.String |