Gets a menu item unique in a particular submenu tree.
Namespace: CleanCode.FormsAssembly: CleanCode (in CleanCode.dll) Version: 1.2.3.0 (1.2.03)
Syntax
public ToolStripMenuItem GetMenuItem( string subMenuDisplayText, string displayText )
Parameters
- subMenuDisplayText
- Type: System String
The display text of the submenu to be search.
- displayText
- Type: System String
The text of the menu item, which must be unique within the given submenu.
Return Value
A menu item containing the given text.Exceptions
Exception | Condition |
---|---|
System InvalidOperationException | The displayText does not exist in the subMenu. |
See Also