IRootBarControl Interface
Provides the base requirements for a control that is the root of a bar hierarchy, such as a Ribbon or StandaloneToolBar.
public interface IRootBarControl
Methods
NotifyMenuOpening(BarMenuItem)
Notifies the bar control that a menu item's submenu is opening.
bool NotifyMenuOpening(BarMenuItem menuItem)
Parameter | Type | Description |
---|---|---|
menuItem | BarMenuItem | The BarMenuItem whose submenu is opening. |
Returns
- bool:
true
if the menu should be allowed to open; otherwise,false
.
NotifyMenuOpening(BarPopupButtonBase)
Notifies the bar control that a popup button's menu is opening.
bool NotifyMenuOpening(BarPopupButtonBase popupButton)
Parameter | Type | Description |
---|---|---|
popupButton | BarPopupButtonBase | The BarPopupButtonBase whose menu is opening. |
Returns
- bool:
true
if the menu should be allowed to open; otherwise,false
.
OpenContextMenuForElement(Control)
Opens a programmatically-generated context menu for the specified object or one of its ancestor elements as appropriate.
bool OpenContextMenuForElement(Control sourceObj)
Parameter | Type | Description |
---|---|---|
sourceObj | Control | The source Avalonia.Controls.Control to examine. |
Returns
- bool:
true
if a menu was opened; otherwise,false
.