-
Notifications
You must be signed in to change notification settings - Fork 31
UG 985939: Added the UG content for secondary drawer and tab bar border - Development #3838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
22a9c0d
dummy commit
karthikasf4617 2c0e08a
Added the UG content for secondary drawer and tab bar border
karthikasf4617 eec7a49
Added the changes
karthikasf4617 d82b246
Added the doc file changes
karthikasf4617 619ffe3
Resolved the feedback shared on the UG content
karthikasf4617 e11e595
Added changes for description
karthikasf4617 e3759dc
Added changes
karthikasf4617 a22c450
Resolved the feedback
karthikasf4617 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,139 @@ | ||
| --- | ||
| layout: post | ||
| title: Multi Drawer in .NET MAUI Navigation Drawer | Syncfusion® | ||
| description: The navigation drawer allows users to open drawers on multiple sides with different toggle methods, offering customizable layouts and smooth transitions. | ||
| platform: MAUI | ||
| control: SfNavigationDrawer | ||
| documentation: UG | ||
| --- | ||
|
|
||
| # Multi Drawer in MAUI Navigation Drawer (SfNavigationDrawer) | ||
|
|
||
| The Navigation drawer allows users to open the drawer on multiple sides with different toggle methods. The [DrawerSettings](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.NavigationDrawer.SfNavigationDrawer.html#Syncfusion_Maui_NavigationDrawer_SfNavigationDrawer_DrawerSettings) class and its properties need to be used when users need to provide multiple drawers. The multiple drawers can be implemented using the following drawer settings. | ||
|
|
||
| * DrawerSettings | ||
| * SecondaryDrawerSettings | ||
|
|
||
| N> Users can open only one drawer at a time. | ||
|
|
||
|  | ||
|
|
||
| ### DrawerSettings | ||
|
|
||
| Implement the primary drawer using the [DrawerSettings](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.NavigationDrawer.SfNavigationDrawer.html#Syncfusion_Maui_NavigationDrawer_SfNavigationDrawer_DrawerSettings) property in SfNavigationDrawer. The following code sample demonstrates how to customize the primary drawer. | ||
|
|
||
| {% tabs %} | ||
|
|
||
| {% highlight xaml %} | ||
|
|
||
| <navigationDrawer:SfNavigationDrawer> | ||
| <navigationDrawer:SfNavigationDrawer.DrawerSettings> | ||
| <navigationDrawer:DrawerSettings DrawerWidth="250" | ||
| Transition="SlideOnTop" | ||
| ContentBackground="LightGray" | ||
| Position="Left"> | ||
| </navigationDrawer:DrawerSettings> | ||
| </navigationDrawer:SfNavigationDrawer.DrawerSettings> | ||
| </navigationDrawer:SfNavigationDrawer> | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% highlight c# %} | ||
|
|
||
|
|
||
| SfNavigationDrawer navigationDrawer = new SfNavigationDrawer(); | ||
| DrawerSettings drawerSettings = new DrawerSettings(); | ||
| drawerSettings.DrawerWidth = 250; | ||
| drawerSettings.Transition = Transition.SlideOnTop; | ||
| drawerSettings.ContentBackground = Colors.LightGray; | ||
| drawerSettings.Position = Position.Left; | ||
| navigationDrawer.DrawerSettings = drawerSettings; | ||
| this.Content = navigationDrawer; | ||
|
|
||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% endtabs %} | ||
|
|
||
| ### SecondaryDrawerSettings | ||
|
|
||
| Implement the secondary drawer using the SecondaryDrawerSettings property in SfNavigationDrawer. Its properties and functionalities are same as the primary drawer. The secondary drawer can be set to different positions similar to the primary drawer. The following code demonstrates how to customize the secondary drawer. | ||
|
|
||
| {% tabs %} | ||
|
|
||
| {% highlight xaml %} | ||
|
|
||
| <navigationDrawer:SfNavigationDrawer> | ||
| <navigationDrawer:SfNavigationDrawer.SecondaryDrawerSettings> | ||
| <navigationDrawer:DrawerSettings x:Name="secondaryDrawer" | ||
| ContentBackground="Blue" | ||
| DrawerWidth= "250" | ||
| Position="Right" | ||
| Transition="SlideOnTop"> | ||
| </navigationDrawer:DrawerSettings> | ||
| </navigationDrawer:SfNavigationDrawer.SecondaryDrawerSettings> | ||
| </navigationDrawer:SfNavigationDrawer> | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% highlight c# %} | ||
|
|
||
| SfNavigationDrawer navigationDrawer = new SfNavigationDrawer(); | ||
| DrawerSettings secondaryDrawer = new DrawerSettings(); | ||
| secondaryDrawer.Position = Position.Right; | ||
| secondaryDrawer.Transition = Transition.SlideOnTop; | ||
| secondaryDrawer.ContentBackground = Colors.Blue; | ||
| secondaryDrawer.DrawerWidth = 250; | ||
| navigationDrawer.SecondaryDrawerSettings = secondaryDrawer; | ||
| this.Content = navigationDrawer; | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% endtabs %} | ||
|
|
||
| N> When the primary drawer and the secondary drawer are set to the same position, the primary drawer will open on swiping. | ||
|
|
||
| ## Toggling method | ||
|
|
||
| Users can toggle the secondary drawer using the `ToggleSecondaryDrawer` method. | ||
|
|
||
| {% highlight c# %} | ||
|
|
||
| SfNavigationDrawer navigationDrawer = new SfNavigationDrawer(); | ||
| navigationDrawer.ToggleSecondaryDrawer(); | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| ### Opening the drawer programmatically | ||
|
|
||
| The `IsOpen` property in the [DrawerSettings](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.NavigationDrawer.SfNavigationDrawer.html#Syncfusion_Maui_NavigationDrawer_SfNavigationDrawer_DrawerSettings) of `SecondaryDrawerSettings` used to open or close the secondary drawer programmatically. | ||
|
|
||
| The following code sample demonstrates how to set `IsOpen` property in XAML and C#. | ||
|
|
||
| {% tabs %} | ||
|
|
||
| {% highlight xaml %} | ||
|
|
||
| <navigationDrawer:SfNavigationDrawer> | ||
| <navigationDrawer:SfNavigationDrawer.SecondaryDrawerSettings> | ||
| <navigationDrawer:DrawerSettings IsOpen="True"> | ||
| </navigationDrawer:DrawerSettings> | ||
| </navigationDrawer:SfNavigationDrawer.SecondaryDrawerSettings> | ||
| </navigationDrawer:SfNavigationDrawer> | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% highlight c# %} | ||
|
|
||
| SfNavigationDrawer navigationDrawer = new SfNavigationDrawer(); | ||
| DrawerSettings secondaryDrawer = new DrawerSettings(); | ||
| secondaryDrawer.IsOpen = true; | ||
| navigationDrawer.SecondaryDrawerSettings = secondaryDrawer; | ||
| this.Content = navigationDrawer; | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% endtabs %} | ||
|
|
||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.