Class MenuBarv2
A horizontal list of MenuBarItemv2s. Each MenuBarItemv2 can have a PopoverMenu that is shown when the MenuBarItemv2 is selected.
public class MenuBarv2 : Menuv2, IDisposable, ISupportInitializeNotification, ISupportInitialize, IOrientation, IDesignable
- Inheritance
-
MenuBarv2
- Implements
- Inherited Members
Remarks
MenuBars may be hosted by any View and will, by default, be positioned the full width across the top of the View's Viewport.
Constructors
- MenuBarv2()
Initializes a new instance of View.
Properties
- Active
Gets or sets whether the menu bar is active or not. When active, the MenuBar can focus and moving the mouse over a MenuBarItem will switch focus to that item. Use IsOpen() to determine if a PopoverMenu of a MenuBarItem is open.
- DefaultBorderStyle
Gets or sets the default Border Style for the MenuBar. The default is None.
- DefaultKey
The default key for activating menu bars.
- Key
Specifies the key that will activate the context menu.
- Menus
Sets the Menu Bar Items for this Menu Bar. This will replace any existing Menu Bar Items.
Methods
- Dispose(bool)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
- EnableForDesign<TContext>(ref TContext)
Causes the View to enable design-time mode. This typically means that the view will load demo data and be configured to allow for design-time manipulation.
- EndInit()
Signals the View that initialization is ending. See ISupportInitialize.
- GetMenuItemsWithTitle(string)
Gets all menu items with the specified Title, anywhere in the menu hierarchy.
- HideActiveItem()
Hides the popover menu associated with the active menu bar item and updates the focus state.
- HideItem(MenuBarItemv2?)
Hides popover menu associated with the specified menu bar item and updates the focus state.
- IsOpen()
Gets whether any of the menu bar items have a visible PopoverMenu.
- OnAccepted(CommandEventArgs)
Called when the user has accepted an item in this menu (or submenu). This is used to determine when to hide the menu.
- OnAccepting(CommandEventArgs)
Called when the user is accepting the state of the View and the Accept has been invoked. Set CommandEventArgs.Cancel to true and return true to stop processing.
- OnBorderStyleChanged()
Called when the BorderStyle has changed.
- OnHasFocusChanged(bool, View?, View?)
Invoked after HasFocus has changed. This method is called before the HasFocusChanged event is raised.
- OnMouseEnter(CancelEventArgs)
Called when the mouse moves over the View's Frame and no other non-SubView occludes it. MouseLeave will be raised when the mouse is no longer over the Frame.
- OnMouseLeave()
Called when the mouse moves outside View's Frame, or is occluded by another non-SubView.
- OnSelectedMenuItemChanged(MenuItemv2?)
Called when the selected menu item has changed.
- OnSubViewAdded(View)
Called when a SubView has been added to this View.
- OnSubViewRemoved(View)
Called when a SubView has been removed from this View.
Events
- KeyChanged
Raised when Key is changed.