ToolStripMenuItem.Checked 屬性

定義

取得或設定值,指出是否已選取 ToolStripMenuItem

public:
 property bool Checked { bool get(); void set(bool value); };
[System.ComponentModel.Bindable(true)]
public bool Checked { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.Checked : bool with get, set
Public Property Checked As Boolean

屬性值

如果 ToolStripMenuItem 已核取或是處於不定狀態,則為 true,否則為 false。 預設為 false

屬性

備註

只有當 未核取 時,屬性 Checked 才會傳回 falseToolStripMenuItem

從 .NET Framework 4.5.2 開始,當專案已核取或不確定時,對應的圖示可能會調整大小。 當app.config檔案包含下列專案時,調整大小是由系統 DPI 設定所決定:

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

適用於

另請參閱