Getting Started of Menu UI Controls
Kettic Menu Controls for Windows Forms offers much more amazing navigation menus than the classic Office style menus. When using the Menu controls, developers can fully customize item appearance, text, orientation, image, checkbox, and any other controls at design time. Additionally, the Menu Controls for Windows Forms allows developers place the menus in horizontal or vertical direction. It also supports menu merging that is able to merge menu items.
How to Create Menus in C#.NET
Kettic Menus WinForms control allows the UI designers to easily create Kettic menus by using standard menu items. It is also able to create ComboBox menu elements and allows the users to create custom style and appearance or add the predefined themes to the menus created. The guide below shows the steps of creating menus in C#.NET.
- Create a new Windows Forms project or open an exist one, drag a Kettic menu control and drop to a form.
- Hit the area labeled as Type Here, click File and Help, and then hit Enter key respectively
- And now, we can add a theme to the menu by dragging a predefined theme from toolbox, for example the Office 2010Blue. This is accomplished by choosing the Kettic Menu control and changing the ThemeName property to Office 2010Blue.
- Choose the File menu item, open the Properties window, click in the Items property, and select the ellipsis button.
- Open the KetticItem Collection Editor, click the Add button, select the drop down arrow, and then choose the KetticMenuItem. Change the value of the Text property to New.
- Add two more KetticMenuItems. Set the Text properties to Open and Save respectively. And then click OK button
- Now, we can go to set the Help menu item. Choose the Help menu item, open the Properties window, click in the Items property, and select the ellipsis button.
- Open the KetticItem Collection Editor, click the Add button, select the drop down arrow, and then choose the KetticMenuComboItem. Clear the Text property of the KetticMenuComboItem.
- And then expand the ComboBoxElement property of the KetticMenuComboItem, hit the Items property of it, and click the ellipsis button.
- Open the KetticListDataItem Collection Editor, hit the Add button, and change the value of the Text property of the new KetticComboBoxItem to Forums.
- Add two more KetticComboBoxItem. Set the Text properties to Support and Knowledge Base respectively.
- And then click the OK button to close the KetticListDataItem Collection Editor and click OK button to close the KetticItem Collection Editor.
- If we want to assign a shortcut to a KetticMenuItem, we need to use the simple C# code snippet,
- Open the Design View of the form, choose the New menu item, open the Properties window, click the events toolbar button, and double clicks the Click event.
- Copy and paste the C# code below to the event handler
- Finally, we can switch to the Design View mode and run the project to see the menu styling, test the message box by using shortcuts and combo box in help menu