.e-content-animation {
margin-left: 50px !important;
}
Sidebar |
API Reference:
|
Getting Started with Syncfusion Blazor |
|
How can I remove the huge margin shown in the second picture, while the Sidebar is open? That huge margin pushes the content almost off the screen.
|
Thank you, I have fixed the issue. Blessings in Jesus Christ our Savior
Hi Keerthana Rajendran,
I saw your source. How can we implement the following image?
Thank you
Hi Sarah,
Currently, we are validating the feasibility of achieving your requirement in the Menu component with the Sidebar. But we need some additional time to further validate on this. We will update you with further details on or before May 27, 2022. We appreciate your patience.
Regards,
Indhumathy L
Hi Sarah,
Sorry for the delay,
We have validated your requirement and prepared the sample for first snapshot and achieve your requirement by using the HamburgerMode property of the menu. Please refer the below code snippet.
[Index.razor]:
@using Syncfusion.Blazor.Navigations;
<SfMenu @ref="menuObj" TValue="MenuItem" HamburgerMode="true" ShowItemOnClick="true"> <MenuItems> <MenuItem Text="File"> <MenuItems> <MenuItem Text="Open" IconCss="e-icons e-bullet"></MenuItem> <MenuItem Text="Save" IconCss="e-icons e-bullet"></MenuItem> <MenuItem Text="Exit" IconCss="e-icons e-bullet"></MenuItem> </MenuItems> </MenuItem> <MenuItem Text="Edit"> <MenuItems> <MenuItem Text="Cut" IconCss="e-icons e-bullet"></MenuItem> <MenuItem Text="Copy" IconCss="e-icons e-bullet"></MenuItem> <MenuItem Text="Paste" IconCss="e-icons e-bullet"></MenuItem> </MenuItems> </MenuItem> <MenuItem Text="View"> <MenuItems> <MenuItem Text="Toolbars"> <MenuItems> <MenuItem Text="Menu Bar" IconCss="e-icons e-bullet"></MenuItem> <MenuItem Text="Bookmarks Toolbar" IconCss="e-icons e-bullet"></MenuItem> <MenuItem Text="Customize" IconCss="e-icons e-bullet"></MenuItem> </MenuItems> </MenuItem> </MenuItems> </MenuItem> <MenuItem Text="Zoom"> <MenuItems> <MenuItem Text="Zoom In" IconCss="e-icons e-bullet"></MenuItem> <MenuItem Text="Zoom Out" IconCss="e-icons e-bullet"></MenuItem> <MenuItem Text="Reset" IconCss="e-icons e-bullet"></MenuItem> </MenuItems> </MenuItem> </MenuItems> </SfMenu>
@code{ private SfMenu<MenuItem> menuObj; protected async override Task OnAfterRenderAsync(bool firstRender) { if(firstRender) { await menuObj.OpenAsync(); } } }
<style> .e-bullet::before { content: '\e254'; } .e-menu-header { display: none !important; } </style> |
Could you please check the above code and get back to us, if you need any further assistance on this.
For second image, we can’t achieve that UI property, in menu we don’t have support for that UI.
For more details, please refer the below UG links.
UG link: https://blazor.syncfusion.com/documentation/menu-bar/usecase-scenario#hamburger-menu;
https://blazor.syncfusion.com/documentation/menu-bar/how-to/change-orientation
Regards,
YuvanShankar A