Search Results for

    Show / Hide Table of Contents

    Class MenuBarItem

    A MenuBarItem contains MenuBarItems or MenuItems.
    Inheritance
    System.Object
    MenuItem
    MenuBarItem
    Inherited Members
    MenuItem.Data
    MenuItem.HotKey
    MenuItem.Shortcut
    MenuItem.ShortcutTag
    MenuItem.Title
    MenuItem.Help
    MenuItem.Action
    MenuItem.CanExecute
    MenuItem.IsEnabled()
    MenuItem.Checked
    MenuItem.CheckType
    MenuItem.Parent
    MenuItem.GetMenuItem()
    MenuItem.GetMenuBarItem()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Terminal.Gui
    Assembly: Terminal.Gui.dll
    Syntax
    public class MenuBarItem : MenuItem

    Constructors

    | Improve this Doc View Source

    MenuBarItem()

    Initializes a new MenuBarItem.
    Declaration
    public MenuBarItem()
    | Improve this Doc View Source

    MenuBarItem(ustring, ustring, Action, Func<Boolean>, MenuItem)

    Initializes a new MenuBarItem as a MenuItem.
    Declaration
    public MenuBarItem(ustring title, ustring help, Action action, Func<bool> canExecute = null, MenuItem parent = null)
    Parameters
    Type Name Description
    NStack.ustring title Title for the menu item.
    NStack.ustring help Help text to display.
    System.Action action Action to invoke when the menu item is activated.
    System.Func<System.Boolean> canExecute Function to determine if the action can currently be executed.
    MenuItem parent The parent MenuItem of this if exist, otherwise is null.
    | Improve this Doc View Source

    MenuBarItem(ustring, List<MenuItem[]>, MenuItem)

    Initializes a new MenuBarItem with separate list of items.
    Declaration
    public MenuBarItem(ustring title, List<MenuItem[]> children, MenuItem parent = null)
    Parameters
    Type Name Description
    NStack.ustring title Title for the menu item.
    System.Collections.Generic.List<MenuItem[]> children The list of items in the current menu.
    MenuItem parent The parent MenuItem of this if exist, otherwise is null.
    | Improve this Doc View Source

    MenuBarItem(ustring, MenuItem[], MenuItem)

    Initializes a new MenuBarItem.
    Declaration
    public MenuBarItem(ustring title, MenuItem[] children, MenuItem parent = null)
    Parameters
    Type Name Description
    NStack.ustring title Title for the menu item.
    MenuItem[] children The items in the current menu.
    MenuItem parent The parent MenuItem of this if exist, otherwise is null.
    | Improve this Doc View Source

    MenuBarItem(MenuItem[])

    Initializes a new MenuBarItem.
    Declaration
    public MenuBarItem(MenuItem[] children)
    Parameters
    Type Name Description
    MenuItem[] children The items in the current menu.

    Properties

    | Improve this Doc View Source

    Children

    Gets or sets an array of MenuItem objects that are the children of this MenuBarItem
    Declaration
    public MenuItem[] Children { get; set; }
    Property Value
    Type Description
    MenuItem[] The children.

    Methods

    | Improve this Doc View Source

    GetChildrenIndex(MenuItem)

    Get the index of the MenuItem parameter.
    Declaration
    public int GetChildrenIndex(MenuItem children)
    Parameters
    Type Name Description
    MenuItem children
    Returns
    Type Description
    System.Int32 Returns a value bigger than -1 if the MenuItem is a child of this.
    | Improve this Doc View Source

    IsSubMenuOf(MenuItem)

    Check if the MenuItem parameter is a child of this.
    Declaration
    public bool IsSubMenuOf(MenuItem menuItem)
    Parameters
    Type Name Description
    MenuItem menuItem
    Returns
    Type Description
    System.Boolean Returns true if it is a child of this. false otherwise.
    | Improve this Doc View Source

    SubMenu(MenuItem)

    Check if the children parameter is a MenuBarItem.
    Declaration
    public MenuBarItem SubMenu(MenuItem children)
    Parameters
    Type Name Description
    MenuItem children
    Returns
    Type Description
    MenuBarItem Returns a MenuBarItem or null otherwise.
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX