
:max_bytes(150000):strip_icc()/livexlive-cea2d940fe354ea1b6eecde93f31ebfc.png)
The following example shows a menu bar item, where the icons for menu items are defined using font icons:

Mac Catalyst does not support displaying icons on menu items. This icon can either be an image, or a font icon. MenuFlyoutItem and MenuFlyoutSubItem inherit the IconImageSource property from MenuItem, which enables a small icon to be displayed next to the text for a menu item.
:max_bytes(150000):strip_icc()/livexlive-cea2d940fe354ea1b6eecde93f31ebfc.png)

In this example, each MenuFlyoutItem defines a menu item that executes an ICommand when selected. Each top-level menu has menu items, and the second top-level menu has a sub-menu and a separator: This example defines three top-level menus. The following example shows a ContentPage that defines menu bar items: MenuBarItem objects can be added to the MenuBarItems collection, of type IList, on a ContentPage.NET MAUI desktop apps will display a menu bar, containing menu items, when they are added to any ContentPage that's hosted in a NavigationPage or a Shell app. The response to a menu item, or sub-item, click can be defined by setting the Clicked, Command, and CommandParameter properties. The appearance of a menu item, or sub-item, can be defined by setting the Text, and IconImageSource properties. MenuItem defines multiple properties that enable the appearance and behavior of a menu item to be specified. MenuFlyoutSubItem derives from MenuFlyoutItem, which in turn derives from MenuItem.
