Back to Devexpress

DXSubMenuItem.Items Property

windowsforms-devexpress-dot-utils-dot-menu-dot-dxsubmenuitem.md

latest3.2 KB
Original Source

DXSubMenuItem.Items Property

Gets a collection of items displayed when the current submenu is expanded.

Namespace : DevExpress.Utils.Menu

Assembly : DevExpress.Utils.v25.2.dll

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

Declaration

csharp
public virtual DXMenuItemCollection Items { get; }
vb
Public Overridable ReadOnly Property Items As DXMenuItemCollection

Property Value

TypeDescription
DevExpress.Utils.Menu.DXMenuItemCollection

A DevExpress.Utils.Menu.DXMenuItemCollection object which contains menu items displayed when the submenu is expanded.

|

Remarks

The Items property provides access to the child menu items of the current submenu. You can add or delete menu items, or customize their settings. Menu items in the collection are represented by the DXMenuItem class objects and its descendants.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Items property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-grid-customize-footer-menu-calculate-custom-totals/CS/Form1.cs#L55

csharp
menuItem.Tag = e.HitInfo.Column;
foreach (DevExpress.Utils.Menu.DXMenuItem item in footerMenu.Items)
    item.Enabled = true;

connect-winforms-grid-to-webapi-service/CS/WinForms.Client/MainForm.cs#L23

csharp
if(e.Menu != null) {
    foreach(DXMenuItem d in e.Menu.Items) {
        if(d.Caption.StartsWith("Filter")) // Disable Filter Editor

winforms-grid-customize-footer-menu-calculate-custom-totals/VB/Form1.vb#L48

vb
menuItem.Tag = e.HitInfo.Column
For Each item As DevExpress.Utils.Menu.DXMenuItem In footerMenu.Items
    item.Enabled = True

See Also

DXSubMenuItem Class

DXSubMenuItem Members

DevExpress.Utils.Menu Namespace