WebMenuBar provides Template type that can be used to place other controls.
This topic will show you how to create Template menu item.
To create Template menu item
- Attach ContextMenu to a control.
- In WebMenuItem Collection Editor, select mnuContextMenu2. Select Items and click the collection button.
- Create one menu item named mnuContextMenuTemplate and set Type to Template.
- Right click on WebContextMenu and choose Edit Template >> Items.
- In mnuContextMenuTemplateItem, drag any control you want to use. In this case, WebCombo control is used and bound to Customers table using AccessDataSource control.
- Right click on the template page and choose End Template Editing to apply the settings.
- Go to WebContextMenu's Properties. Expand MenuStyleSettings and set MenuWindowType to Normal.
- Run the project. Right click on the button and point your mouse to ContextMenu2. The sub menu item is using template type which contains WebCombo control.