xtd 0.2.0
Loading...
Searching...
No Matches

◆ get_main_menu()

std::optional< std::reference_wrapper< main_menu > > xtd::forms::menu::get_main_menu ( ) const
noexcept

Gets the main_menu that contains this menu.

Returns
The main_menu that contains this menu. The default is has no value.
Remarks
This method allows you to obtain a reference to the main_menu that this menu is contained in. This property returns no value if the menu is not contained in a main_menu. This can occur if the menu is contained in a menu_item or context_menu, or if the menu is not contained in any menu. You can use this property to determine whether a menu is currently being used, and also to determine where.