Skip to main content

CommandPopupMenu<T>.GetDXMenuItemById(DXPopupMenu, T, Boolean) Method

Searches for a menu item specified by its ID within a specified menu object.

Namespace: DevExpress.Utils.Menu

Assembly: DevExpress.Utils.v24.2.dll

Declaration

public static DXMenuItem GetDXMenuItemById(
    DXPopupMenu menu,
    T id,
    bool recursive
)

Parameters

Name Type Description
menu DXPopupMenu

A DXPopupMenu object that is the menu from which a search starts.

id T

An integer that is the position of the menu item within the menu object.

recursive Boolean

true, to search nested menus recursively; otherwise, false.

Returns

Type Description
DXMenuItem

A DXMenuItem object if the menu with a specified identifier is found; otherwise null (or Nothing in Visual Basic)

Remarks

The GetDXMenuItemById method searches for a menu specified by its identifier. A search is performed in the root menu object only if the recursive parameter is false. If it is set to true, then the search proceeds to lower levels recursively.

See Also