Merge Menu Items in C#.NET
Kettic Menu Control for Windows Forms allows the users to merge menu items in C# for their applications as well as in a MDI application. To merge KetticMenuItems in C#.NET, the MergeMenu method of KetticMenu will be applied. The KetticMenu is able to find MergeMenu method automatically in a child MDI form, and merge them in a parent form when the child MDI form is maximized. This is achieved by defining MergeType and MergeOrder properties for KetticMenuItem.
How to Merge Menu Items in C#.NET
To merge menu items in C#.NET, we need to call the MergeMenu method of Kettic Menu component, and use the parameter to designate the source menu, where the method will be invoked to determine the destination menu.
When we need to merge menu items in a MDI application, we need not call the MergeMethod and the KetticMenu is able to find the method automatically in a child MDI form and will invoke the MergeMenu when necessary.
The C# code below demonstrates how to use the MergeMenu method.
Properties for Merging Menu Items
To process the merging of menu items, the KetticMenuItem C# class has contains two properties for this, MergeType and MergeOrder. The following shows details of the two properties. MergeType Property for Merging Menu Items in C#.NET
The MergeType property determines the type MenuMerge, including Add, Replace, MergeItems, and Remove.
MergeOrder Property for Merging Menu Items in C#.NET
The merge order of items is determine by an integer value, which ranges from 0 to greater. The merge order value controls the relative position of the menu item based on the values of the other menu items that will be merged. The higher values will place menu items to the right and the lower values will place the menu items to the left. |
UI Controlsfor Windows Forms .NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI DesignWinForms UI Controls WinForms Buttons UI Control WinForms Calendar UI ControlWinForms Carousel UI ControlWinForms Chart UI ControlWinForms Clock UI ControlCommandBar UI ControlWinForms Dock UI ControlDesktop Alert UI ControlDropDown List UI ControlWinForms Editor UI ControlForms and Dialogs UI ControlWinForms GridView UI ControlWinForms ListView UI ControlWinForms Menu UI ControlMenu - Get Started in C#Menu - Menu DesignerMenu - Working with ItemsAdd / RemoveMulti-Line TextEventsMenu - Styling & AppearanceMenu OrientationMenu BackgroundMenu Item ImagesAnimation EffectsMenu - Menu MergeMenu - Application MenuMenu - Context MenuWinForms ComboBox UI ControlWinForms PageView UI ControlPanels and Labels UI ControlWinForms Panorama UI ControlWinForms PDFViewer UI ControlWinForms Property Grid UI ControlWinForms Ribbon UI ControlWinForms PivotGrid UI ControlWinForms RichTextBox UI ControlWinForms Rotator UI ControlWinForms Scheduler UI ControlWinForms Shortcuts UI ControlWinForms SpellChecker UI ControlWinForms Track & Status UI ControlWinForms TreeView UI ControlWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |