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

◆ get_context_menu()

std::optional< std::reference_wrapper< context_menu > > xtd::forms::menu::get_context_menu ( ) const
noexcept

Gets the context_menu that contains this menu.

Returns
The context_menu that contains this menu. The default is no value.
Remarks
This method allows you to obtain a reference to the context_menu that this menu is contained in. This property returns no value if the menu is not contained in a context_menu. This can occur if the menu is contained in a menu_item or main_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.