New to Telerik UI for WinFormsStart a free 30-day trial

RadMenuItem

Updated over 6 months ago

The following controls are used to create a menu structure:

  • RadMenuItem

  • RadMenuHeaderItem

  • RadMenuComboItem

  • RadMenuSeparatorItem

  • RadMenuContentItem

RadMenuItem

The RadMenuItem represents a standard menu item. Some of its properties include:

PropertiesDescription
AutoSizeModeIndicates how the menu item will be sized and can be FitToAvailableSize, WrapAroundChildren or Auto.
AngleTransformSets the angle offset from horizontal with which the item will be displayed.
CommandBindingAllows you to configure keyboard shortcuts to fire a given menu item. See the Getting Started topic for an example.
DisplayStyleLets you choose whether to show an image, text, or both on the item.
DescriptionTextContains the text for the description that appears just below the Text. DescriptionFont controls the font characteristics of the DescriptionText display. See the example menu item in the figure below.
WinForms RadMenus menus-menu-working-with-radmenu-items-radmenuitem 001
EnabledWhen set to false shows the menu item as grayed out and does not react to mouse clicks. To allow non-standard painting when the menu item is not enabled set the UseDefaultDisabledPaint property to false and then use the Visual Style Builder to customize the appearance of this state.
FlipTextFlips the text of the item vertically if set to true.
BackColor and ForeColorSet the colors of the background and text.
FontSets the font and size of the item text.
HintTextSets the text to appear at the right side of the menu item, such as Ctrl+N for New.
Image, ImageIndex, and ImageKeyLet you assign an image to display on the item.
IsCheckedControls whether a check mark is displayed on the item.
TextImageRelationControls the relationship between the text and image displayed on the item.
TextSpecifies the text to show on the item.
TextOrientationAllows you to choose vertical or horizontal text display.
CheckOnClickIndicates whether selecting the item should set a check mark.
HasTwoColumnDropDownLets you add a drop-down menu that contains two columns.
IsMainMenuItemIndicates that the menu item is an item on the main menu, rather than an item on a drop-down menu.
PopupDirectionIndicates whether the direction in which the drop-down menu will open will be to the left, right, up, or down.
ShowArrowDisplays an arrow button on the drop-down menu.
StringAlignmentFormats the alignment of the text string so it is positioned near, center, or far from the left border of the menu item.

RadMenuComboItem

The RadMenuComboItem allows you to put a drop-down list on a menu. To add items to the combo box work with the Items collection of the RadMenuComboItem.ComboBoxElement property. Since the ComboBoxElement returns a RadDropDownListElement, you can also use data binding to put items in the drop-down list from any data source.

RadMenuContentItem

The RadMenuContentItem is a container control that allows you to build up custom menu items from other controls. You can assign any RadElement based control to the ContentElement property of a RadMenuContentItem. See Nesting Controls in Menu Items for an example.

RadMenuSeparatorItem

The RadMenuSeparatorItem is used to add a horizontal line for visual separation between successive items on a menu.

RadMenuSeparatorItem defines a TextVisibility property and it needs to be set to Visible in order the text set to the item to be displayed.

See Also