我正在使用一个带有两个主要ToolStripMenuItems
的MenuStrip
,每个都有其自己的“下拉”菜单,其中更多的ToolStripMenuItems
具有设置为true的CheckOnClick
属性。
现在我正在尝试检索所选项目,我知道bool ToolStripMenuItem.Checked
存在,但是如何使用循环从每个主要ToolStripMenuItem
中获取ToolStripMenuItems
,然后检查哪个Checked
等于true?
或者有没有更好的方法来检索已检查的ToolStripMenuItem
?