XCore.MenuAdapter.MakeMenu C# (CSharp) Method

MakeMenu() protected method

protected MakeMenu ( CommandBar parent, XCore.ChoiceGroup group ) : CommandBarItem
parent System.Windows.Forms.CommandBar
group XCore.ChoiceGroup
return System.Windows.Forms.CommandBarItem
		protected CommandBarItem MakeMenu (CommandBar parent, ChoiceGroup group)
		{
			string label = group.Label.Replace("_", "&");
			CommandBarMenu menu = parent.Items.AddMenu(label);
			menu.Tag = group;
			group.ReferenceWidget = menu;
			menu.DropDown += new System.EventHandler(group.OnDisplay);

#if DEBUG
			//needed for unit testing
			//menu.Click += new System.EventHandler(group.OnDisplay);
#endif
			return menu;
		}