Gets or sets a value indicating whether a check mark appears next to the text of the menu item.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
You can use theproperty in combination with other menu items in a menu to provide state for an application. For example, you can place a check mark on a menu item in a group of items to identify the size of the font to be displayed for the text in an application. You can also use the property to identify the selected menu item in a group of mutually exclusive menu items.
This property cannot be set to true for top-level menu items.
The following code example uses the TextBox control. The event handler provided is used by the Click event of three menu items. Each menu item specifies a text color, menuItemRed (Red), menuItemGreen (Green), or menuItemBlue (Blue). The event handler determines which menu item was clicked, places a checkmark to the selected menu item, and changes the text color of the form's TextBox control. The example requires that the System.Drawing namespace has been added to the form that this code is placed in. The example also requires that a TextBox has been added to the form that this example code is located in that is named textBox1.property to provide the state in an application. In this example, a group of menu items are used to specify the color for the text in a
Available since 1.1