ToolStripMenuItem.CheckState Property

Definition

Gets or sets a value indicating whether a ToolStripMenuItem is in the checked, unchecked, or indeterminate state.

[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.CheckState CheckState { get; set; }

Property Value

One of the CheckState values. The default is Unchecked.

Attributes

Exceptions

The CheckState property is not set to one of the CheckState values.

Remarks

Use the CheckState property to control or determine whether a ToolStripMenuItem is initially checked, unchecked, or in an indeterminate state.

Starting with the .NET Framework 4.5.2, if the CheckState property is set to Checked or Indeterminate, the corresponding icon may be resized. Resizing is determined by the system DPI setting when the app.config file contains the following entry:

<appSettings>
  <add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</appSettings>

Applies to

Producto Versiones
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also