Show / Hide Table of Contents

Class MenuItem

A menu item has a title, an associated help text, and an action to execute on activation.

Inheritance
System.Object
MenuItem
Namespace: Terminal
Assembly: Terminal.dll
Syntax
public class MenuItem

Constructors

MenuItem(String, String, Action)

Initializes a new MenuItem.

Declaration
public MenuItem (string title, string help, Action action);
Parameters
Type Name Description
System.String title

Title for the menu item.

System.String help

Help text to display.

System.Action action

Action to invoke when the menu item is activated.

Fields

HotKey

The hotkey is used when the menu is active, the shortcut can be triggered when the menu is not active.
For example HotKey would be "N" when the File Menu is open (assuming there is a "_New" entry if the ShortCut is set to "Control-N", this would be a global hotkey that would trigger as well

Declaration
public char HotKey;
Field Value
Type Description
System.Char

To be added.

ShortCut

This is the global setting that can be used as a global shortcut to invoke the action on the menu.

Declaration
public Terminal.Key ShortCut;
Field Value
Type Description
Key

To be added.

Properties

Action

Gets or sets the action to be invoked when the menu is triggered

Declaration
public Action Action { get; set; }
Property Value
Type Description
System.Action

Method to invoke.

Help

Gets or sets the help text for the menu item.

Declaration
public string Help { get; set; }
Property Value
Type Description
System.String

The help text.

Title

Gets or sets the title.

Declaration
public string Title { get; set; }
Property Value
Type Description
System.String

The title.

Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX