Adding menu items via designer in Windows Forms Menu (Menus)

This section provides a quick overview to add the menu items to a Menu control through the designer.

The MainFrameBarManager can be added to the application by drag and dropping from the tool box to the design form. The following required assembly references will be added automatically.

  • Syncfusion.Grid.Base.dll
  • Syncfusion.Grid.Windows.dll
  • Syncfusion.Shared.Base.dll
  • Syncfusion.Shared.Windows.dll
  • Syncfusion.Tools.Base.dll
  • Syncfusion.Tools.Windows.dll
  • Syncfusion.Licensing.dll
  • Syncfusion.SpellChecker.Base.dll

Menu control selection from toolbox

Menu control added to Form

Adding main bar

The Bar component acts as a place holder for the menu items. It can be added to the menu via the Customize dialog. To do so, select the Customize... option from the smart tags menu. Under the Toolbars tab of the dialog, the bar can be added.

Adding bar

Adding parent item

The ParentBarItem is a type of bar item, that acts as a parent component for child bar items and sub-menu.

ParentBarItem

Adding drop down item

The DropDownBarItem is a type of bar item, which will display a popup menu when clicked. A custom control can also be loaded and displayed when the menu item is clicked. This can be done by assigning the required component to the PopupControlContainer property of the drop down bar item.

DropDownBarItem selection

DropDownBarItem and CustomControl

Form with DropDownBarItem and CustomControl

Adding combo box item

The ComboBoxBarItem is a type of bar item, which behaves like combo box control. The items collection can be specified using the ChoiceList property. The String Collection Editor gets opened to add or edit the items of the combo box bar item.

ComboboxBarItem selection

ComboboxbarItem added in designer

ComboboxBarItem properties

Form with ComboboxBarItem

Adding static item

A StaticBarItem is a type of bar item, which behaves like Label control.

StaticBarItem selected

StaticBarItem added in designer

Adding toolbar item

A ToolBarListBarItem is a type of bar item, which behaves like a toolbar menu item. It displays the options to customize the menu items of the parent tool bar to which it gets associated.

ToolBarListBarItem selected

Form with ToolBarListBarItem

Adding textbox item

The TextBoxBarItem is a type of bar item, which behaves like text box control. The text edited can be obtained via the TextBoxValue property.

TextBoxBarItem selected

TextBoxbarItem added in designer