Table of Contents

Method GetMenuItemsOfAllSubMenus

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

GetMenuItemsOfAllSubMenus(Func<MenuItem, bool>?)

Gets menu items in this menu's hierarchy, optionally filtered by predicate.

public IEnumerable<MenuItem> GetMenuItemsOfAllSubMenus(Func<MenuItem, bool>? predicate = null)

Parameters

predicate Func<MenuItem, bool>

If provided, only MenuItems matching the predicate are returned. If null, all menu items are returned.

Returns

IEnumerable<MenuItem>

The matching MenuItem instances across all menus in the hierarchy.

Remarks

This method traverses all menus returned by GetAllSubMenus() and collects their menu items.