The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi There,
I'm trying to add menu to my main form and am having no luck! Seems like I'm missing a step, but what?
int catId = mainMenuManager.Categories.Add("xxxx");
ParentBarItem menuBar = new ParentBarItem();
menuBar.CategoryIndex = catId;
menuBar.ID = "zzzz";
menuBar.Text = "test";
mainMenuManager.Items.Add(menuBar);
mainMenu.Items.Add(menuBar);
RPRamesh Praveen Syncfusion Team June 16, 2003 10:23 AM UTC
Hi,
A ParentBarItem represents a dropdown submenu (please refer to our User's Guide in Tools\Docs\User's Guide folder) which itself needs to be added to a Bar instance. So, you will have to also do this:
Bar mainMenuBar = new Bar();
mainMenuBar.BarStyle = BarStyle.IsMainMenu|...;
mainMenuBar.Text = '...";
// This will add an empty main menu bar to your form
mainMenuManager.Bars.Add(mainMenuBar);
// Then create a new instance of a ParentBarItem as in the code above and add it to your mainMenuBar.
mainMenuBar.Items.Add(parentBarItem);
Regards,
Praveen