MenuBuilder GetMenuItem Method (String)CleanCode C# Libraries v1.2.03 API
Gets a menu item unique in the entire menu tree.

Namespace: CleanCode.Forms
Assembly: CleanCode (in CleanCode.dll) Version: 1.2.3.0 (1.2.03)
Syntax

public ToolStripMenuItem GetMenuItem(
	string displayText
)

Parameters

displayText
Type: OnlineSystem String
The text of the menu item, which must be unique within the menu tree.

Return Value

A menu item containing the given text.
Remarks

This method provides a convenience mechanism for menu items that are unique. The MenuBuilder class automatically keeps track of these so this context-free accessor may be used to retrieve a menu item. Use GetMenuItem(String, String) for non-unique menu items.
See Also