Class SfNavigationDrawer
Represents a panel that displays the navigation options.
Inheritance
Namespace: Syncfusion.SfNavigationDrawer.XForms
Assembly: Syncfusion.SfNavigationDrawer.XForms.dll
Syntax
public class SfNavigationDrawer : StackLayout, IParentThemeElement, IThemeElement
Remarks
NavigationDrawer is a SfNavigationDrawer which means it displays the app's main navigation options on the edges of the screen. It is hidden most of the time, but is revealed when the user swipes a finger from the edge of the screen or.
Constructors
SfNavigationDrawer()
Initializes a new instance of the SfNavigationDrawer class.
Declaration
public SfNavigationDrawer()
Fields
ContentViewProperty
Identifies the ContentView bindable property. This property can be used to customize the content view of the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty ContentViewProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
DefaultDrawerSettingsProperty
The properties of the DefaultDrawerSettings class that contains all the customizations in the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty DefaultDrawerSettingsProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
DrawerContentViewProperty
Identifies the DrawerContentView bindable property. This property can be used to customize the drawer content view of the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty DrawerContentViewProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
DrawerFooterHeightProperty
Identifies the DrawerFooterHeight bindable property. This property can be used to customize the drawer footer height of the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty DrawerFooterHeightProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
DrawerFooterViewProperty
Identifies the DrawerFooterView bindable property. This property can be used to customize the drawer footer view of the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty DrawerFooterViewProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
DrawerHeaderHeightProperty
Identifies the DrawerHeaderHeight bindable property. This property can be used to customize the drawer header height of the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty DrawerHeaderHeightProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
DrawerHeaderViewProperty
Identifies the DrawerHeaderView bindable property. This property can be used to customize the drawer header view of the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty DrawerHeaderViewProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
DrawerHeightProperty
Identifies the DrawerHeight bindable property. This property can be used to customize the drawer height of the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty DrawerHeightProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
DrawerWidthProperty
Identifies the DrawerWidth bindable property. This property can be used to customize the drawer width of the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty DrawerWidthProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
DurationProperty
Identifies the Duration bindable property. This property can be used to change the animation duration of the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty DurationProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
EnableSwipeGestureProperty
Identifies the EnableSwipeGesture bindable property. It indicates whether swipe gesture to open drawer is enabled or not in the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty EnableSwipeGestureProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
IsOpenProperty
Identifies the IsOpen bindable property. It indicates whether the drawer is opened or not in the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty IsOpenProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
OpacityProperty
Identifies the Opacity bindable property. This property can be used to customize the opacity in the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty OpacityProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
PositionProperty
Identifies the Position bindable property. This property can be used to change the drawer position of the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty PositionProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
SecondaryDrawerSettingsProperty
The properties of SecondaryDrawerSettings class that contains all the customizations in the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty SecondaryDrawerSettingsProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TouchThresholdProperty
Identifies the TouchThreshold bindable property. You can get the drag position of the drawer based on touch threshold value.
Declaration
public static readonly BindableProperty TouchThresholdProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TransitionProperty
Identifies the Transition bindable property. This property can be used to change the transition mode of the SfNavigationDrawer control.
Declaration
public static readonly BindableProperty TransitionProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
ContentView
Gets or sets the content view of SfNavigationDrawer control.
Declaration
public View ContentView { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.View | The default value is null. |
DefaultDrawerSettings
Gets or sets the properties of the DefaultDrawerSettings class that contains all the customization in the SfNavigationDrawer control.
Declaration
public DrawerSettings DefaultDrawerSettings { get; set; }
Property Value
Type | Description |
---|---|
DrawerSettings | The DefaultDrawerSettings properties. |
DrawerContentView
Gets or sets the drawer content view of SfNavigationDrawer control.
Declaration
public View DrawerContentView { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.View | The default value is null. |
DrawerFooterHeight
Gets or sets the drawer header height of SfNavigationDrawer control.
Declaration
public float DrawerFooterHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The default value is 150. |
DrawerFooterView
Gets or sets the drawer footer view of SfNavigationDrawer control.
Declaration
public View DrawerFooterView { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.View | The default value is null. |
DrawerHeaderHeight
Gets or sets the drawer header height of SfNavigationDrawer control.
Declaration
public float DrawerHeaderHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The default value is 150. |
DrawerHeaderView
Gets or sets the drawer header view of SfNavigationDrawer control.
Declaration
public View DrawerHeaderView { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.View | The default value is null. |
DrawerHeight
Gets or sets the drawer height of SfNavigationDrawer control.
Declaration
public float DrawerHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The default value is 500. |
DrawerWidth
Gets or sets the drawer width of SfNavigationDrawer control.
Declaration
public float DrawerWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The default value is 300. |
Duration
Gets or sets the animation duration of SfNavigationDrawer control.
Declaration
public float Duration { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The default value is 400. |
EnableSwipeGesture
Gets or sets a value indicating whether the swipe gesture to open drawer is enabled or not in SfNavigationDrawer control.
Declaration
public bool EnableSwipeGesture { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is |
IsOpen
Gets or sets a value indicating whether the drawer is open in SfNavigationDrawer control.
Declaration
public bool IsOpen { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is |
Opacity
Gets or sets the opacity value of SfNavigationDrawer control.
Declaration
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is set 0.5 for Android and iOS platform and set 0.3 for UWP platform. |
Position
Gets or sets the drawer position of SfNavigationDrawer control.
Declaration
public Position Position { get; set; }
Property Value
Type | Description |
---|---|
Position | The default value is Left. |
SecondaryDrawerSettings
Gets or sets the properties of the SecondaryDrawerSettings class that contains all the customizations in the SfNavigationDrawer control.
Declaration
public DrawerSettings SecondaryDrawerSettings { get; set; }
Property Value
Type | Description |
---|---|
DrawerSettings | The SecondaryDrawerSettings properties. |
TouchThreshold
Gets or sets the touch threshold value of SfNavigationDrawer control.
Declaration
public float TouchThreshold { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The default value is 40. |
Transition
Gets or sets the transition of SfNavigationDrawer control.
Declaration
public Transition Transition { get; set; }
Property Value
Type | Description |
---|---|
Transition | The default value is SlideOnTop. |
Methods
add_Closing(SfNavigationDrawer.OpeningEventHandler)
Declaration
public void add_Closing(SfNavigationDrawer.OpeningEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfNavigationDrawer.OpeningEventHandler | value |
add_Opening(SfNavigationDrawer.OpeningEventHandler)
Declaration
public void add_Opening(SfNavigationDrawer.OpeningEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfNavigationDrawer.OpeningEventHandler | value |
add_Toggled(SfNavigationDrawer.ToggledEventHandler)
Declaration
public void add_Toggled(SfNavigationDrawer.ToggledEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfNavigationDrawer.ToggledEventHandler | value |
OnBindingContextChanged()
Binding context changed method.
Declaration
protected override void OnBindingContextChanged()
OnSizeRequest(Double, Double)
Raises the size request event in the SfNavigationDrawer control.
Declaration
protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint)
Parameters
Type | Name | Description |
---|---|---|
System.Double | widthConstraint | Width constraint. |
System.Double | heightConstraint | Height constraint. |
Returns
Type | Description |
---|---|
Xamarin.Forms.SizeRequest | The return value. |
remove_Closing(SfNavigationDrawer.OpeningEventHandler)
Declaration
public void remove_Closing(SfNavigationDrawer.OpeningEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfNavigationDrawer.OpeningEventHandler | value |
remove_Opening(SfNavigationDrawer.OpeningEventHandler)
Declaration
public void remove_Opening(SfNavigationDrawer.OpeningEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfNavigationDrawer.OpeningEventHandler | value |
remove_Toggled(SfNavigationDrawer.ToggledEventHandler)
Declaration
public void remove_Toggled(SfNavigationDrawer.ToggledEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfNavigationDrawer.ToggledEventHandler | value |
ToggleDrawer()
Toggles the drawer to open or close based on the existing state in the SfNavigationDrawer control.
Declaration
public void ToggleDrawer()
ToggleSecondaryDrawer()
Toggles the secondary drawer to open or close based on the existing state in the SfNavigationDrawer control.
Declaration
public void ToggleSecondaryDrawer()
Events
Closed
The Closed event occurs after close the drawer of the SfNavigationDrawer control.
Declaration
public event EventHandler Closed
Event Type
Type |
---|
System.EventHandler |
Closing
The ClosingEvent occurs when close the drawer of the SfNavigationDrawer control.
Declaration
public event SfNavigationDrawer.OpeningEventHandler Closing
Event Type
Type |
---|
SfNavigationDrawer.OpeningEventHandler |
Opening
The OpeningEvent occurs when open the drawer of the SfNavigationDrawer control.
Declaration
public event SfNavigationDrawer.OpeningEventHandler Opening
Event Type
Type |
---|
SfNavigationDrawer.OpeningEventHandler |
Toggled
The ToggledEvent occurs when the drawer is toggled to open or close in the SfNavigationDrawer control.
Declaration
public event SfNavigationDrawer.ToggledEventHandler Toggled
Event Type
Type |
---|
SfNavigationDrawer.ToggledEventHandler |