Terminal.Gui.MenuItem.html 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class MenuItem
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class MenuItem
  11. ">
  12. <meta name="generator" content="docfx 2.59.4.0">
  13. <link rel="shortcut icon" href="../../favicon.ico">
  14. <link rel="stylesheet" href="../../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../../styles/docfx.css">
  16. <link rel="stylesheet" href="../../styles/main.css">
  17. <link href="https://fonts.googleapis.com/css?family=Source Sans Pro" rel="stylesheet">
  18. <link href="https://fonts.googleapis.com/css?family=Source Code Pro" rel="stylesheet">
  19. <meta property="docfx:navrel" content="../../toc.html">
  20. <meta property="docfx:tocrel" content="toc.html">
  21. <meta property="docfx:rel" content="../../">
  22. </head> <body data-spy="scroll" data-target="#affix" data-offset="120">
  23. <div id="wrapper">
  24. <header>
  25. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  26. <div class="container">
  27. <div class="navbar-header">
  28. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  29. <span class="sr-only">Toggle navigation</span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. </button>
  34. <a class="navbar-brand" href="../../index.html">
  35. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  36. </a>
  37. </div>
  38. <div class="collapse navbar-collapse" id="navbar">
  39. <form class="navbar-form navbar-right" role="search" id="search">
  40. <div class="form-group">
  41. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  42. </div>
  43. </form>
  44. </div>
  45. </div>
  46. </nav>
  47. <div class="subnav navbar navbar-default">
  48. <div class="container hide-when-search" id="breadcrumb">
  49. <ul class="breadcrumb">
  50. <li></li>
  51. </ul>
  52. </div>
  53. </div>
  54. </header>
  55. <div class="container body-content">
  56. <div id="search-results">
  57. <div class="search-list">Search Results for <span></span></div>
  58. <div class="sr-items">
  59. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  60. </div>
  61. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  62. </div>
  63. </div>
  64. <div role="main" class="container body-content hide-when-search">
  65. <div class="sidenav hide-when-search">
  66. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  67. <div class="sidetoggle collapse" id="sidetoggle">
  68. <div id="sidetoc"></div>
  69. </div>
  70. </div>
  71. <div class="article row grid-right">
  72. <div class="col-md-10">
  73. <article class="content wrap" id="_content" data-uid="Terminal.Gui.MenuItem">
  74. <h1 id="Terminal_Gui_MenuItem" data-uid="Terminal.Gui.MenuItem" class="text-break">Class MenuItem
  75. </h1>
  76. <div class="markdown level0 summary">
  77. A <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a> has title, an associated help text, and an action to execute on activation.
  78. MenuItems can also have a checked indicator (see <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Checked">Checked</a>).
  79. </div>
  80. <div class="markdown level0 conceptual"></div>
  81. <div class="inheritance">
  82. <h5>Inheritance</h5>
  83. <div class="level0"><span class="xref">System.Object</span></div>
  84. <div class="level1"><span class="xref">MenuItem</span></div>
  85. <div class="level2"><a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a></div>
  86. </div>
  87. <div class="inheritedMembers">
  88. <h5>Inherited Members</h5>
  89. <div>
  90. <span class="xref">System.Object.Equals(System.Object)</span>
  91. </div>
  92. <div>
  93. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  94. </div>
  95. <div>
  96. <span class="xref">System.Object.GetHashCode()</span>
  97. </div>
  98. <div>
  99. <span class="xref">System.Object.GetType()</span>
  100. </div>
  101. <div>
  102. <span class="xref">System.Object.MemberwiseClone()</span>
  103. </div>
  104. <div>
  105. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  106. </div>
  107. <div>
  108. <span class="xref">System.Object.ToString()</span>
  109. </div>
  110. </div>
  111. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  112. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  113. <h5 id="Terminal_Gui_MenuItem_syntax">Syntax</h5>
  114. <div class="codewrapper">
  115. <pre><code class="lang-csharp hljs">public class MenuItem</code></pre>
  116. </div>
  117. <h3 id="constructors">Constructors
  118. </h3>
  119. <span class="small pull-right mobile-hide">
  120. <span class="divider">|</span>
  121. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem__ctor_Terminal_Gui_Key_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.%23ctor(Terminal.Gui.Key)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  122. </span>
  123. <span class="small pull-right mobile-hide">
  124. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L47">View Source</a>
  125. </span>
  126. <a id="Terminal_Gui_MenuItem__ctor_" data-uid="Terminal.Gui.MenuItem.#ctor*"></a>
  127. <h4 id="Terminal_Gui_MenuItem__ctor_Terminal_Gui_Key_" data-uid="Terminal.Gui.MenuItem.#ctor(Terminal.Gui.Key)">MenuItem(Key)</h4>
  128. <div class="markdown level1 summary">
  129. Initializes a new instance of <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>
  130. </div>
  131. <div class="markdown level1 conceptual"></div>
  132. <h5 class="decalaration">Declaration</h5>
  133. <div class="codewrapper">
  134. <pre><code class="lang-csharp hljs">public MenuItem(Key shortcut = Key.Null)</code></pre>
  135. </div>
  136. <h5 class="parameters">Parameters</h5>
  137. <table class="table table-bordered table-striped table-condensed">
  138. <thead>
  139. <tr>
  140. <th>Type</th>
  141. <th>Name</th>
  142. <th>Description</th>
  143. </tr>
  144. </thead>
  145. <tbody>
  146. <tr>
  147. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  148. <td><span class="parametername">shortcut</span></td>
  149. <td></td>
  150. </tr>
  151. </tbody>
  152. </table>
  153. <span class="small pull-right mobile-hide">
  154. <span class="divider">|</span>
  155. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem__ctor_ustring_ustring_System_Action_System_Func_System_Boolean__Terminal_Gui_MenuItem_Terminal_Gui_Key_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.%23ctor(ustring%2Custring%2CSystem.Action%2CSystem.Func%7BSystem.Boolean%7D%2CTerminal.Gui.MenuItem%2CTerminal.Gui.Key)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  156. </span>
  157. <span class="small pull-right mobile-hide">
  158. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L58">View Source</a>
  159. </span>
  160. <a id="Terminal_Gui_MenuItem__ctor_" data-uid="Terminal.Gui.MenuItem.#ctor*"></a>
  161. <h4 id="Terminal_Gui_MenuItem__ctor_ustring_ustring_System_Action_System_Func_System_Boolean__Terminal_Gui_MenuItem_Terminal_Gui_Key_" data-uid="Terminal.Gui.MenuItem.#ctor(ustring,ustring,System.Action,System.Func{System.Boolean},Terminal.Gui.MenuItem,Terminal.Gui.Key)">MenuItem(ustring, ustring, Action, Func&lt;Boolean&gt;, MenuItem, Key)</h4>
  162. <div class="markdown level1 summary">
  163. Initializes a new instance of <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>.
  164. </div>
  165. <div class="markdown level1 conceptual"></div>
  166. <h5 class="decalaration">Declaration</h5>
  167. <div class="codewrapper">
  168. <pre><code class="lang-csharp hljs">public MenuItem(ustring title, ustring help, Action action, Func&lt;bool&gt; canExecute = null, MenuItem parent = null, Key shortcut = Key.Null)</code></pre>
  169. </div>
  170. <h5 class="parameters">Parameters</h5>
  171. <table class="table table-bordered table-striped table-condensed">
  172. <thead>
  173. <tr>
  174. <th>Type</th>
  175. <th>Name</th>
  176. <th>Description</th>
  177. </tr>
  178. </thead>
  179. <tbody>
  180. <tr>
  181. <td><span class="xref">ustring</span></td>
  182. <td><span class="parametername">title</span></td>
  183. <td>Title for the menu item.</td>
  184. </tr>
  185. <tr>
  186. <td><span class="xref">ustring</span></td>
  187. <td><span class="parametername">help</span></td>
  188. <td>Help text to display.</td>
  189. </tr>
  190. <tr>
  191. <td><span class="xref">System.Action</span></td>
  192. <td><span class="parametername">action</span></td>
  193. <td>Action to invoke when the menu item is activated.</td>
  194. </tr>
  195. <tr>
  196. <td><span class="xref">System.Func</span>&lt;<span class="xref">System.Boolean</span>&gt;</td>
  197. <td><span class="parametername">canExecute</span></td>
  198. <td>Function to determine if the action can currently be executed.</td>
  199. </tr>
  200. <tr>
  201. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a></td>
  202. <td><span class="parametername">parent</span></td>
  203. <td>The <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Parent">Parent</a> of this menu item.</td>
  204. </tr>
  205. <tr>
  206. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  207. <td><span class="parametername">shortcut</span></td>
  208. <td>The <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Shortcut">Shortcut</a> keystroke combination.</td>
  209. </tr>
  210. </tbody>
  211. </table>
  212. <h3 id="fields">Fields
  213. </h3>
  214. <span class="small pull-right mobile-hide">
  215. <span class="divider">|</span>
  216. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_HotKey.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.HotKey%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  217. </span>
  218. <span class="small pull-right mobile-hide">
  219. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L86">View Source</a>
  220. </span>
  221. <h4 id="Terminal_Gui_MenuItem_HotKey" data-uid="Terminal.Gui.MenuItem.HotKey">HotKey</h4>
  222. <div class="markdown level1 summary">
  223. The HotKey is used to activate a <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a> with the keyboard. HotKeys are defined by prefixing the <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Title">Title</a>
  224. of a MenuItem with an underscore (&apos;_&apos;).
  225. <p>
  226. Pressing Alt-Hotkey for a <a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a> (menu items on the menu bar) works even if the menu is not active).
  227. Once a menu has focus and is active, pressing just the HotKey will activate the MenuItem.
  228. </p>
  229. <p>
  230. For example for a MenuBar with a &quot;_File&quot; MenuBarItem that contains a &quot;_New&quot; MenuItem, Alt-F will open the File menu.
  231. Pressing the N key will then activate the New MenuItem.
  232. </p>
  233. <p>
  234. See also <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Shortcut">Shortcut</a> which enable global key-bindings to menu items.
  235. </p>
  236. </div>
  237. <div class="markdown level1 conceptual"></div>
  238. <h5 class="decalaration">Declaration</h5>
  239. <div class="codewrapper">
  240. <pre><code class="lang-csharp hljs">public Rune HotKey</code></pre>
  241. </div>
  242. <h5 class="fieldValue">Field Value</h5>
  243. <table class="table table-bordered table-striped table-condensed">
  244. <thead>
  245. <tr>
  246. <th>Type</th>
  247. <th>Description</th>
  248. </tr>
  249. </thead>
  250. <tbody>
  251. <tr>
  252. <td><span class="xref">Rune</span></td>
  253. <td></td>
  254. </tr>
  255. </tbody>
  256. </table>
  257. <h3 id="properties">Properties
  258. </h3>
  259. <span class="small pull-right mobile-hide">
  260. <span class="divider">|</span>
  261. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_Action.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.Action%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  262. </span>
  263. <span class="small pull-right mobile-hide">
  264. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L133">View Source</a>
  265. </span>
  266. <a id="Terminal_Gui_MenuItem_Action_" data-uid="Terminal.Gui.MenuItem.Action*"></a>
  267. <h4 id="Terminal_Gui_MenuItem_Action" data-uid="Terminal.Gui.MenuItem.Action">Action</h4>
  268. <div class="markdown level1 summary">
  269. Gets or sets the action to be invoked when the menu item is triggered.
  270. </div>
  271. <div class="markdown level1 conceptual"></div>
  272. <h5 class="decalaration">Declaration</h5>
  273. <div class="codewrapper">
  274. <pre><code class="lang-csharp hljs">public Action Action { get; set; }</code></pre>
  275. </div>
  276. <h5 class="propertyValue">Property Value</h5>
  277. <table class="table table-bordered table-striped table-condensed">
  278. <thead>
  279. <tr>
  280. <th>Type</th>
  281. <th>Description</th>
  282. </tr>
  283. </thead>
  284. <tbody>
  285. <tr>
  286. <td><span class="xref">System.Action</span></td>
  287. <td>Method to invoke.</td>
  288. </tr>
  289. </tbody>
  290. </table>
  291. <span class="small pull-right mobile-hide">
  292. <span class="divider">|</span>
  293. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_CanExecute.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.CanExecute%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  294. </span>
  295. <span class="small pull-right mobile-hide">
  296. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L140">View Source</a>
  297. </span>
  298. <a id="Terminal_Gui_MenuItem_CanExecute_" data-uid="Terminal.Gui.MenuItem.CanExecute*"></a>
  299. <h4 id="Terminal_Gui_MenuItem_CanExecute" data-uid="Terminal.Gui.MenuItem.CanExecute">CanExecute</h4>
  300. <div class="markdown level1 summary">
  301. Gets or sets the action to be invoked to determine if the menu can be triggered. If <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_CanExecute">CanExecute</a> returns <span class="xref">true</span>
  302. the menu item will be enabled. Otherwise, it will be disabled.
  303. </div>
  304. <div class="markdown level1 conceptual"></div>
  305. <h5 class="decalaration">Declaration</h5>
  306. <div class="codewrapper">
  307. <pre><code class="lang-csharp hljs">public Func&lt;bool&gt; CanExecute { get; set; }</code></pre>
  308. </div>
  309. <h5 class="propertyValue">Property Value</h5>
  310. <table class="table table-bordered table-striped table-condensed">
  311. <thead>
  312. <tr>
  313. <th>Type</th>
  314. <th>Description</th>
  315. </tr>
  316. </thead>
  317. <tbody>
  318. <tr>
  319. <td><span class="xref">System.Func</span>&lt;<span class="xref">System.Boolean</span>&gt;</td>
  320. <td>Function to determine if the action is can be executed or not.</td>
  321. </tr>
  322. </tbody>
  323. </table>
  324. <span class="small pull-right mobile-hide">
  325. <span class="divider">|</span>
  326. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_Checked.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.Checked%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  327. </span>
  328. <span class="small pull-right mobile-hide">
  329. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L168">View Source</a>
  330. </span>
  331. <a id="Terminal_Gui_MenuItem_Checked_" data-uid="Terminal.Gui.MenuItem.Checked*"></a>
  332. <h4 id="Terminal_Gui_MenuItem_Checked" data-uid="Terminal.Gui.MenuItem.Checked">Checked</h4>
  333. <div class="markdown level1 summary">
  334. Sets or gets whether the <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a> shows a check indicator or not. See <a class="xref" href="Terminal.Gui.MenuItemCheckStyle.html">MenuItemCheckStyle</a>.
  335. </div>
  336. <div class="markdown level1 conceptual"></div>
  337. <h5 class="decalaration">Declaration</h5>
  338. <div class="codewrapper">
  339. <pre><code class="lang-csharp hljs">public bool Checked { get; set; }</code></pre>
  340. </div>
  341. <h5 class="propertyValue">Property Value</h5>
  342. <table class="table table-bordered table-striped table-condensed">
  343. <thead>
  344. <tr>
  345. <th>Type</th>
  346. <th>Description</th>
  347. </tr>
  348. </thead>
  349. <tbody>
  350. <tr>
  351. <td><span class="xref">System.Boolean</span></td>
  352. <td></td>
  353. </tr>
  354. </tbody>
  355. </table>
  356. <span class="small pull-right mobile-hide">
  357. <span class="divider">|</span>
  358. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_CheckType.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.CheckType%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  359. </span>
  360. <span class="small pull-right mobile-hide">
  361. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L173">View Source</a>
  362. </span>
  363. <a id="Terminal_Gui_MenuItem_CheckType_" data-uid="Terminal.Gui.MenuItem.CheckType*"></a>
  364. <h4 id="Terminal_Gui_MenuItem_CheckType" data-uid="Terminal.Gui.MenuItem.CheckType">CheckType</h4>
  365. <div class="markdown level1 summary">
  366. Sets or gets the <a class="xref" href="Terminal.Gui.MenuItemCheckStyle.html">MenuItemCheckStyle</a> of a menu item where <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Checked">Checked</a> is set to <span class="xref">true</span>.
  367. </div>
  368. <div class="markdown level1 conceptual"></div>
  369. <h5 class="decalaration">Declaration</h5>
  370. <div class="codewrapper">
  371. <pre><code class="lang-csharp hljs">public MenuItemCheckStyle CheckType { get; set; }</code></pre>
  372. </div>
  373. <h5 class="propertyValue">Property Value</h5>
  374. <table class="table table-bordered table-striped table-condensed">
  375. <thead>
  376. <tr>
  377. <th>Type</th>
  378. <th>Description</th>
  379. </tr>
  380. </thead>
  381. <tbody>
  382. <tr>
  383. <td><a class="xref" href="Terminal.Gui.MenuItemCheckStyle.html">MenuItemCheckStyle</a></td>
  384. <td></td>
  385. </tr>
  386. </tbody>
  387. </table>
  388. <span class="small pull-right mobile-hide">
  389. <span class="divider">|</span>
  390. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_Data.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.Data%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  391. </span>
  392. <span class="small pull-right mobile-hide">
  393. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L42">View Source</a>
  394. </span>
  395. <a id="Terminal_Gui_MenuItem_Data_" data-uid="Terminal.Gui.MenuItem.Data*"></a>
  396. <h4 id="Terminal_Gui_MenuItem_Data" data-uid="Terminal.Gui.MenuItem.Data">Data</h4>
  397. <div class="markdown level1 summary">
  398. Gets or sets arbitrary data for the menu item.
  399. </div>
  400. <div class="markdown level1 conceptual"></div>
  401. <h5 class="decalaration">Declaration</h5>
  402. <div class="codewrapper">
  403. <pre><code class="lang-csharp hljs">public object Data { get; set; }</code></pre>
  404. </div>
  405. <h5 class="propertyValue">Property Value</h5>
  406. <table class="table table-bordered table-striped table-condensed">
  407. <thead>
  408. <tr>
  409. <th>Type</th>
  410. <th>Description</th>
  411. </tr>
  412. </thead>
  413. <tbody>
  414. <tr>
  415. <td><span class="xref">System.Object</span></td>
  416. <td></td>
  417. </tr>
  418. </tbody>
  419. </table>
  420. <span class="small pull-right mobile-hide">
  421. <span class="divider">|</span>
  422. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_Help.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.Help%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  423. </span>
  424. <span class="small pull-right mobile-hide">
  425. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L127">View Source</a>
  426. </span>
  427. <a id="Terminal_Gui_MenuItem_Help_" data-uid="Terminal.Gui.MenuItem.Help*"></a>
  428. <h4 id="Terminal_Gui_MenuItem_Help" data-uid="Terminal.Gui.MenuItem.Help">Help</h4>
  429. <div class="markdown level1 summary">
  430. Gets or sets the help text for the menu item. The help text is drawn to the right of the <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Title">Title</a>.
  431. </div>
  432. <div class="markdown level1 conceptual"></div>
  433. <h5 class="decalaration">Declaration</h5>
  434. <div class="codewrapper">
  435. <pre><code class="lang-csharp hljs">public ustring Help { get; set; }</code></pre>
  436. </div>
  437. <h5 class="propertyValue">Property Value</h5>
  438. <table class="table table-bordered table-striped table-condensed">
  439. <thead>
  440. <tr>
  441. <th>Type</th>
  442. <th>Description</th>
  443. </tr>
  444. </thead>
  445. <tbody>
  446. <tr>
  447. <td><span class="xref">ustring</span></td>
  448. <td>The help text.</td>
  449. </tr>
  450. </tbody>
  451. </table>
  452. <span class="small pull-right mobile-hide">
  453. <span class="divider">|</span>
  454. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_Parent.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.Parent%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  455. </span>
  456. <span class="small pull-right mobile-hide">
  457. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L179">View Source</a>
  458. </span>
  459. <a id="Terminal_Gui_MenuItem_Parent_" data-uid="Terminal.Gui.MenuItem.Parent*"></a>
  460. <h4 id="Terminal_Gui_MenuItem_Parent" data-uid="Terminal.Gui.MenuItem.Parent">Parent</h4>
  461. <div class="markdown level1 summary">
  462. Gets the parent for this <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>.
  463. </div>
  464. <div class="markdown level1 conceptual"></div>
  465. <h5 class="decalaration">Declaration</h5>
  466. <div class="codewrapper">
  467. <pre><code class="lang-csharp hljs">public MenuItem Parent { get; }</code></pre>
  468. </div>
  469. <h5 class="propertyValue">Property Value</h5>
  470. <table class="table table-bordered table-striped table-condensed">
  471. <thead>
  472. <tr>
  473. <th>Type</th>
  474. <th>Description</th>
  475. </tr>
  476. </thead>
  477. <tbody>
  478. <tr>
  479. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a></td>
  480. <td>The parent.</td>
  481. </tr>
  482. </tbody>
  483. </table>
  484. <span class="small pull-right mobile-hide">
  485. <span class="divider">|</span>
  486. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_Shortcut.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.Shortcut%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  487. </span>
  488. <span class="small pull-right mobile-hide">
  489. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L95">View Source</a>
  490. </span>
  491. <a id="Terminal_Gui_MenuItem_Shortcut_" data-uid="Terminal.Gui.MenuItem.Shortcut*"></a>
  492. <h4 id="Terminal_Gui_MenuItem_Shortcut" data-uid="Terminal.Gui.MenuItem.Shortcut">Shortcut</h4>
  493. <div class="markdown level1 summary">
  494. Shortcut defines a key binding to the MenuItem that will invoke the MenuItem&apos;s action globally for the <a class="xref" href="Terminal.Gui.View.html">View</a> that is
  495. the parent of the <a class="xref" href="Terminal.Gui.MenuBar.html">MenuBar</a> or <a class="xref" href="Terminal.Gui.ContextMenu.html">ContextMenu</a> this <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>.
  496. <p>
  497. The <a class="xref" href="Terminal.Gui.Key.html">Key</a> will be drawn on the MenuItem to the right of the <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Title">Title</a> and <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Help">Help</a> text. See <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_ShortcutTag">ShortcutTag</a>.
  498. </p>
  499. </div>
  500. <div class="markdown level1 conceptual"></div>
  501. <h5 class="decalaration">Declaration</h5>
  502. <div class="codewrapper">
  503. <pre><code class="lang-csharp hljs">public Key Shortcut { get; set; }</code></pre>
  504. </div>
  505. <h5 class="propertyValue">Property Value</h5>
  506. <table class="table table-bordered table-striped table-condensed">
  507. <thead>
  508. <tr>
  509. <th>Type</th>
  510. <th>Description</th>
  511. </tr>
  512. </thead>
  513. <tbody>
  514. <tr>
  515. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  516. <td></td>
  517. </tr>
  518. </tbody>
  519. </table>
  520. <span class="small pull-right mobile-hide">
  521. <span class="divider">|</span>
  522. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_ShortcutTag.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.ShortcutTag%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  523. </span>
  524. <span class="small pull-right mobile-hide">
  525. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L107">View Source</a>
  526. </span>
  527. <a id="Terminal_Gui_MenuItem_ShortcutTag_" data-uid="Terminal.Gui.MenuItem.ShortcutTag*"></a>
  528. <h4 id="Terminal_Gui_MenuItem_ShortcutTag" data-uid="Terminal.Gui.MenuItem.ShortcutTag">ShortcutTag</h4>
  529. <div class="markdown level1 summary">
  530. Gets the text describing the keystroke combination defined by <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Shortcut">Shortcut</a>.
  531. </div>
  532. <div class="markdown level1 conceptual"></div>
  533. <h5 class="decalaration">Declaration</h5>
  534. <div class="codewrapper">
  535. <pre><code class="lang-csharp hljs">public ustring ShortcutTag { get; }</code></pre>
  536. </div>
  537. <h5 class="propertyValue">Property Value</h5>
  538. <table class="table table-bordered table-striped table-condensed">
  539. <thead>
  540. <tr>
  541. <th>Type</th>
  542. <th>Description</th>
  543. </tr>
  544. </thead>
  545. <tbody>
  546. <tr>
  547. <td><span class="xref">ustring</span></td>
  548. <td></td>
  549. </tr>
  550. </tbody>
  551. </table>
  552. <span class="small pull-right mobile-hide">
  553. <span class="divider">|</span>
  554. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_Title.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.Title%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  555. </span>
  556. <span class="small pull-right mobile-hide">
  557. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L113">View Source</a>
  558. </span>
  559. <a id="Terminal_Gui_MenuItem_Title_" data-uid="Terminal.Gui.MenuItem.Title*"></a>
  560. <h4 id="Terminal_Gui_MenuItem_Title" data-uid="Terminal.Gui.MenuItem.Title">Title</h4>
  561. <div class="markdown level1 summary">
  562. Gets or sets the title of the menu item .
  563. </div>
  564. <div class="markdown level1 conceptual"></div>
  565. <h5 class="decalaration">Declaration</h5>
  566. <div class="codewrapper">
  567. <pre><code class="lang-csharp hljs">public ustring Title { get; set; }</code></pre>
  568. </div>
  569. <h5 class="propertyValue">Property Value</h5>
  570. <table class="table table-bordered table-striped table-condensed">
  571. <thead>
  572. <tr>
  573. <th>Type</th>
  574. <th>Description</th>
  575. </tr>
  576. </thead>
  577. <tbody>
  578. <tr>
  579. <td><span class="xref">ustring</span></td>
  580. <td>The title.</td>
  581. </tr>
  582. </tbody>
  583. </table>
  584. <h3 id="methods">Methods
  585. </h3>
  586. <span class="small pull-right mobile-hide">
  587. <span class="divider">|</span>
  588. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_GetMenuBarItem.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.GetMenuBarItem%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  589. </span>
  590. <span class="small pull-right mobile-hide">
  591. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L197">View Source</a>
  592. </span>
  593. <a id="Terminal_Gui_MenuItem_GetMenuBarItem_" data-uid="Terminal.Gui.MenuItem.GetMenuBarItem*"></a>
  594. <h4 id="Terminal_Gui_MenuItem_GetMenuBarItem" data-uid="Terminal.Gui.MenuItem.GetMenuBarItem">GetMenuBarItem()</h4>
  595. <div class="markdown level1 summary">
  596. Merely a debugging aid to see the interaction with main.
  597. </div>
  598. <div class="markdown level1 conceptual"></div>
  599. <h5 class="decalaration">Declaration</h5>
  600. <div class="codewrapper">
  601. <pre><code class="lang-csharp hljs">public bool GetMenuBarItem()</code></pre>
  602. </div>
  603. <h5 class="returns">Returns</h5>
  604. <table class="table table-bordered table-striped table-condensed">
  605. <thead>
  606. <tr>
  607. <th>Type</th>
  608. <th>Description</th>
  609. </tr>
  610. </thead>
  611. <tbody>
  612. <tr>
  613. <td><span class="xref">System.Boolean</span></td>
  614. <td></td>
  615. </tr>
  616. </tbody>
  617. </table>
  618. <span class="small pull-right mobile-hide">
  619. <span class="divider">|</span>
  620. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_GetMenuItem.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.GetMenuItem%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  621. </span>
  622. <span class="small pull-right mobile-hide">
  623. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L189">View Source</a>
  624. </span>
  625. <a id="Terminal_Gui_MenuItem_GetMenuItem_" data-uid="Terminal.Gui.MenuItem.GetMenuItem*"></a>
  626. <h4 id="Terminal_Gui_MenuItem_GetMenuItem" data-uid="Terminal.Gui.MenuItem.GetMenuItem">GetMenuItem()</h4>
  627. <div class="markdown level1 summary">
  628. Merely a debugging aid to see the interaction with main.
  629. </div>
  630. <div class="markdown level1 conceptual"></div>
  631. <h5 class="decalaration">Declaration</h5>
  632. <div class="codewrapper">
  633. <pre><code class="lang-csharp hljs">public MenuItem GetMenuItem()</code></pre>
  634. </div>
  635. <h5 class="returns">Returns</h5>
  636. <table class="table table-bordered table-striped table-condensed">
  637. <thead>
  638. <tr>
  639. <th>Type</th>
  640. <th>Description</th>
  641. </tr>
  642. </thead>
  643. <tbody>
  644. <tr>
  645. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a></td>
  646. <td></td>
  647. </tr>
  648. </tbody>
  649. </table>
  650. <span class="small pull-right mobile-hide">
  651. <span class="divider">|</span>
  652. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem_IsEnabled.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.IsEnabled%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  653. </span>
  654. <span class="small pull-right mobile-hide">
  655. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L145">View Source</a>
  656. </span>
  657. <a id="Terminal_Gui_MenuItem_IsEnabled_" data-uid="Terminal.Gui.MenuItem.IsEnabled*"></a>
  658. <h4 id="Terminal_Gui_MenuItem_IsEnabled" data-uid="Terminal.Gui.MenuItem.IsEnabled">IsEnabled()</h4>
  659. <div class="markdown level1 summary">
  660. Returns <span class="xref">true</span> if the menu item is enabled. This method is a wrapper around <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_CanExecute">CanExecute</a>.
  661. </div>
  662. <div class="markdown level1 conceptual"></div>
  663. <h5 class="decalaration">Declaration</h5>
  664. <div class="codewrapper">
  665. <pre><code class="lang-csharp hljs">public bool IsEnabled()</code></pre>
  666. </div>
  667. <h5 class="returns">Returns</h5>
  668. <table class="table table-bordered table-striped table-condensed">
  669. <thead>
  670. <tr>
  671. <th>Type</th>
  672. <th>Description</th>
  673. </tr>
  674. </thead>
  675. <tbody>
  676. <tr>
  677. <td><span class="xref">System.Boolean</span></td>
  678. <td></td>
  679. </tr>
  680. </tbody>
  681. </table>
  682. </article>
  683. </div>
  684. <div class="hidden-sm col-md-2" role="complementary">
  685. <div class="sideaffix">
  686. <div class="contribution">
  687. <ul class="nav">
  688. <li>
  689. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuItem.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
  690. </li>
  691. <li>
  692. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/Menu.cs/#L33" class="contribution-link">View Source</a>
  693. </li>
  694. </ul>
  695. </div>
  696. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  697. <h5>In This Article</h5>
  698. <div></div>
  699. </nav>
  700. </div>
  701. </div>
  702. </div>
  703. </div>
  704. <footer>
  705. <div class="grad-bottom"></div>
  706. <div class="footer">
  707. <div class="container">
  708. <span class="pull-right">
  709. <a href="#top">Back to top</a>
  710. </span>
  711. <span>Generated by <strong>DocFX</strong></span>
  712. </div>
  713. </div>
  714. </footer>
  715. </div>
  716. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  717. <script type="text/javascript" src="../../styles/docfx.js"></script>
  718. <script type="text/javascript" src="../../styles/main.js"></script>
  719. </body>
  720. </html>