Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

#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