Class DrawerSettings
Drawer settings class for customize the drawer.
Inheritance
Namespace: Syncfusion.Maui.Toolkit.NavigationDrawer
Assembly: Syncfusion.Maui.Toolkit.dll
Syntax
public class DrawerSettings : Element
Constructors
DrawerSettings()
Initializes a new instance of the DrawerSettings class.
Declaration
public DrawerSettings()
Fields
ContentBackgroundProperty
Identifies the ContentBackground bindable property.
Declaration
public static readonly BindableProperty ContentBackgroundProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
DrawerContentViewProperty
Identifies the DrawerContentView bindable property.
Declaration
public static readonly BindableProperty DrawerContentViewProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The DrawerContentView is mandatory to allocate space for the drawer.
DrawerFooterHeightProperty
Identifies the DrawerFooterHeight bindable property.
Declaration
public static readonly BindableProperty DrawerFooterHeightProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The DrawerFooterView can be removed by setting the DrawerFooterHeight to zero.
DrawerFooterViewProperty
Identifies the DrawerFooterView bindable property.
Declaration
public static readonly BindableProperty DrawerFooterViewProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The DrawerFooterView can be removed by setting the DrawerFooterHeight to zero.
DrawerHeaderHeightProperty
Identifies the DrawerHeaderHeight bindable property.
Declaration
public static readonly BindableProperty DrawerHeaderHeightProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The DrawerHeaderView can be removed by setting the DrawerHeaderHeight to zero.
DrawerHeaderViewProperty
Identifies the DrawerHeaderView bindable property.
Declaration
public static readonly BindableProperty DrawerHeaderViewProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The DrawerHeaderView can be removed by setting the DrawerHeaderHeight to zero.
DrawerHeightProperty
Identifies the DrawerHeight bindable property.
Declaration
public static readonly BindableProperty DrawerHeightProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
DrawerWidthProperty
Identifies the DrawerWidth bindable property.
Declaration
public static readonly BindableProperty DrawerWidthProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
DurationProperty
Identifies the Duration bindable property.
Declaration
public static readonly BindableProperty DurationProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The Duration property for the SfNavigationDrawer is measured in milliseconds.
EnableSwipeGestureProperty
Identifies the EnableSwipeGesture bindable property.
Declaration
public static readonly BindableProperty EnableSwipeGestureProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
PositionProperty
Identifies the Position bindable property.
Declaration
public static readonly BindableProperty PositionProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
TouchThresholdProperty
Identifies the TouchThreshold bindable property.
Declaration
public static readonly BindableProperty TouchThresholdProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
TransitionProperty
Identifies the Transition bindable property.
Declaration
public static readonly BindableProperty TransitionProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Properties
ContentBackground
Gets or sets a value that can be used to customize the background color of the drawer.
Declaration
public Color ContentBackground { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Graphics.Color | It accepts ContentBackground values and the default value is "#F7F2FB". |
Examples
var drawerSettings = new DrawerSettings
{
ContentBackground = Colors.Blue
};
DrawerContentView
Gets or sets the view that can be used to customize the drawer content view of SfNavigationDrawer.
Declaration
public View DrawerContentView { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.View | It accepts DrawerContentView values and the default value is null. |
Examples
var drawerSettings = new DrawerSettings
{
DrawerContentView = new StackLayout
{
Children =
{
new Label { Text = "Content" },
new Button { Text = "Click Me" }
}
}
};
DrawerFooterHeight
Gets or sets a value that can be used to customize the navigation drawer's footer height.
Declaration
public double DrawerFooterHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts DrawerFooterHeight values and the default value is 50d. |
Examples
var drawerSettings = new DrawerSettings
{
DrawerFooterHeight = 100
};
DrawerFooterView
Gets or sets the view that can be used to customize the drawer footer view of SfNavigationDrawer.
Declaration
public View DrawerFooterView { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.View | It accepts DrawerFooterView values and the default value is null. |
Examples
var drawerSettings = new DrawerSettings
{
DrawerFooterView = new StackLayout
{
Children =
{
new Label { Text = "Footer" },
new Button { Text = "Close" }
}
}
};
DrawerHeaderHeight
Gets or sets a value that can be used to customize the navigation drawer's header height.
Declaration
public double DrawerHeaderHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts DrawerHeaderHeight values and the default value is 50d. |
Examples
var drawerSettings = new DrawerSettings
{
DrawerHeaderHeight = 100
};
DrawerHeaderView
Gets or sets the view that can be used to customize the drawer header view of SfNavigationDrawer.
Declaration
public View DrawerHeaderView { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.View | It accepts DrawerHeaderView values and the default value is null. |
Examples
var drawerSettings = new DrawerSettings
{
DrawerHeaderView = new Label { Text = "Header" }
};
DrawerHeight
Gets or sets a value that can be used to modify the drawer's height.
Declaration
public double DrawerHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts DrawerHeight values and the default value is 500d. |
Examples
var drawerSettings = new DrawerSettings
{
DrawerHeight = 600
};
DrawerWidth
Gets or sets a value that can be used to modify the drawer's width.
Declaration
public double DrawerWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts DrawerWidth values and the default value is 200d. |
Examples
var drawerSettings = new DrawerSettings
{
DrawerWidth = 300
};
Duration
Gets or sets a value that can be used to modify the animation duration of the drawer.
Declaration
public double Duration { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts Duration values and the default value is 400d. |
Examples
var drawerSettings = new DrawerSettings
{
Duration = 300
};
EnableSwipeGesture
Gets or sets a value indicating whether the swiping gesture to open the drawer is enabled or not.
Declaration
public bool EnableSwipeGesture { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | It accepts EnableSwipeGesture values and the default value is true. |
Examples
var drawerSettings = new DrawerSettings
{
EnableSwipeGesture = true
};
Position
Gets or sets a value that can be used to customize the drawer's position.
Declaration
public Position Position { get; set; }
Property Value
Type | Description |
---|---|
Position |
Examples
var drawerSettings = new DrawerSettings
{
Position = Position.Right
};
TouchThreshold
Gets or sets a value that can be used to modify the touch threshold of the drawer.
Declaration
public double TouchThreshold { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts TouchThreshold values and the default value is 120d. |
Examples
var drawerSettings = new DrawerSettings
{
TouchThreshold = 50
};
Transition
Gets or sets a value that can be used to modify the animation of the drawer.
Declaration
public Transition Transition { get; set; }
Property Value
Type | Description |
---|---|
Transition | It accepts Transition values and the default value is SlideOnTop. |
Examples
var drawerSettings = new DrawerSettings
{
Transition = Transition.SlideOnTop
};