Terminal.Gui.MenuItem.html 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  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 a title, an associated help text, and an action to execute on activation.
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <div class="inheritance">
  81. <h5>Inheritance</h5>
  82. <div class="level0"><span class="xref">System.Object</span></div>
  83. <div class="level1"><span class="xref">MenuItem</span></div>
  84. <div class="level2"><a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a></div>
  85. </div>
  86. <div class="inheritedMembers">
  87. <h5>Inherited Members</h5>
  88. <div>
  89. <span class="xref">System.Object.Equals(System.Object)</span>
  90. </div>
  91. <div>
  92. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  93. </div>
  94. <div>
  95. <span class="xref">System.Object.GetHashCode()</span>
  96. </div>
  97. <div>
  98. <span class="xref">System.Object.GetType()</span>
  99. </div>
  100. <div>
  101. <span class="xref">System.Object.MemberwiseClone()</span>
  102. </div>
  103. <div>
  104. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  105. </div>
  106. <div>
  107. <span class="xref">System.Object.ToString()</span>
  108. </div>
  109. </div>
  110. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  111. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  112. <h5 id="Terminal_Gui_MenuItem_syntax">Syntax</h5>
  113. <div class="codewrapper">
  114. <pre><code class="lang-csharp hljs">public class MenuItem</code></pre>
  115. </div>
  116. <h3 id="constructors">Constructors
  117. </h3>
  118. <span class="small pull-right mobile-hide">
  119. <span class="divider">|</span>
  120. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MenuItem__ctor_NStack_ustring_NStack_ustring_System_Action_System_Func_System_Boolean__Terminal_Gui_MenuItem_Terminal_Gui_Key_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuItem.%23ctor(NStack.ustring%2CNStack.ustring%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>
  121. </span>
  122. <span class="small pull-right mobile-hide">
  123. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L67">View Source</a>
  124. </span>
  125. <a id="Terminal_Gui_MenuItem__ctor_" data-uid="Terminal.Gui.MenuItem.#ctor*"></a>
  126. <h4 id="Terminal_Gui_MenuItem__ctor_NStack_ustring_NStack_ustring_System_Action_System_Func_System_Boolean__Terminal_Gui_MenuItem_Terminal_Gui_Key_" data-uid="Terminal.Gui.MenuItem.#ctor(NStack.ustring,NStack.ustring,System.Action,System.Func{System.Boolean},Terminal.Gui.MenuItem,Terminal.Gui.Key)">MenuItem(ustring, ustring, Action, Func&lt;Boolean&gt;, MenuItem, Key)</h4>
  127. <div class="markdown level1 summary">
  128. Initializes a new instance of <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>.
  129. </div>
  130. <div class="markdown level1 conceptual"></div>
  131. <h5 class="decalaration">Declaration</h5>
  132. <div class="codewrapper">
  133. <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>
  134. </div>
  135. <h5 class="parameters">Parameters</h5>
  136. <table class="table table-bordered table-striped table-condensed">
  137. <thead>
  138. <tr>
  139. <th>Type</th>
  140. <th>Name</th>
  141. <th>Description</th>
  142. </tr>
  143. </thead>
  144. <tbody>
  145. <tr>
  146. <td><span class="xref">NStack.ustring</span></td>
  147. <td><span class="parametername">title</span></td>
  148. <td>Title for the menu item.</td>
  149. </tr>
  150. <tr>
  151. <td><span class="xref">NStack.ustring</span></td>
  152. <td><span class="parametername">help</span></td>
  153. <td>Help text to display.</td>
  154. </tr>
  155. <tr>
  156. <td><span class="xref">System.Action</span></td>
  157. <td><span class="parametername">action</span></td>
  158. <td>Action to invoke when the menu item is activated.</td>
  159. </tr>
  160. <tr>
  161. <td><span class="xref">System.Func</span>&lt;<span class="xref">System.Boolean</span>&gt;</td>
  162. <td><span class="parametername">canExecute</span></td>
  163. <td>Function to determine if the action can currently be executed.</td>
  164. </tr>
  165. <tr>
  166. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a></td>
  167. <td><span class="parametername">parent</span></td>
  168. <td>The <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Parent">Parent</a> of this menu item.</td>
  169. </tr>
  170. <tr>
  171. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  172. <td><span class="parametername">shortcut</span></td>
  173. <td>The <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Shortcut">Shortcut</a> keystroke combination.</td>
  174. </tr>
  175. </tbody>
  176. </table>
  177. <span class="small pull-right mobile-hide">
  178. <span class="divider">|</span>
  179. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  180. </span>
  181. <span class="small pull-right mobile-hide">
  182. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L56">View Source</a>
  183. </span>
  184. <a id="Terminal_Gui_MenuItem__ctor_" data-uid="Terminal.Gui.MenuItem.#ctor*"></a>
  185. <h4 id="Terminal_Gui_MenuItem__ctor_Terminal_Gui_Key_" data-uid="Terminal.Gui.MenuItem.#ctor(Terminal.Gui.Key)">MenuItem(Key)</h4>
  186. <div class="markdown level1 summary">
  187. Initializes a new instance of <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>
  188. </div>
  189. <div class="markdown level1 conceptual"></div>
  190. <h5 class="decalaration">Declaration</h5>
  191. <div class="codewrapper">
  192. <pre><code class="lang-csharp hljs">public MenuItem(Key shortcut = Key.Null)</code></pre>
  193. </div>
  194. <h5 class="parameters">Parameters</h5>
  195. <table class="table table-bordered table-striped table-condensed">
  196. <thead>
  197. <tr>
  198. <th>Type</th>
  199. <th>Name</th>
  200. <th>Description</th>
  201. </tr>
  202. </thead>
  203. <tbody>
  204. <tr>
  205. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  206. <td><span class="parametername">shortcut</span></td>
  207. <td></td>
  208. </tr>
  209. </tbody>
  210. </table>
  211. <h3 id="fields">Fields
  212. </h3>
  213. <span class="small pull-right mobile-hide">
  214. <span class="divider">|</span>
  215. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  216. </span>
  217. <span class="small pull-right mobile-hide">
  218. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L85">View Source</a>
  219. </span>
  220. <h4 id="Terminal_Gui_MenuItem_HotKey" data-uid="Terminal.Gui.MenuItem.HotKey">HotKey</h4>
  221. <div class="markdown level1 summary">
  222. The HotKey is used when the menu is active, the shortcut can be triggered when the menu is not active.
  223. For example HotKey would be &quot;N&quot; when the File Menu is open (assuming there is a &quot;_New&quot; entry
  224. if the Shortcut is set to &quot;Control-N&quot;, this would be a global hotkey that would trigger as well
  225. </div>
  226. <div class="markdown level1 conceptual"></div>
  227. <h5 class="decalaration">Declaration</h5>
  228. <div class="codewrapper">
  229. <pre><code class="lang-csharp hljs">public Rune HotKey</code></pre>
  230. </div>
  231. <h5 class="fieldValue">Field Value</h5>
  232. <table class="table table-bordered table-striped table-condensed">
  233. <thead>
  234. <tr>
  235. <th>Type</th>
  236. <th>Description</th>
  237. </tr>
  238. </thead>
  239. <tbody>
  240. <tr>
  241. <td><span class="xref">System.Rune</span></td>
  242. <td></td>
  243. </tr>
  244. </tbody>
  245. </table>
  246. <h3 id="properties">Properties
  247. </h3>
  248. <span class="small pull-right mobile-hide">
  249. <span class="divider">|</span>
  250. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  251. </span>
  252. <span class="small pull-right mobile-hide">
  253. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L128">View Source</a>
  254. </span>
  255. <a id="Terminal_Gui_MenuItem_Action_" data-uid="Terminal.Gui.MenuItem.Action*"></a>
  256. <h4 id="Terminal_Gui_MenuItem_Action" data-uid="Terminal.Gui.MenuItem.Action">Action</h4>
  257. <div class="markdown level1 summary">
  258. Gets or sets the action to be invoked when the menu is triggered
  259. </div>
  260. <div class="markdown level1 conceptual"></div>
  261. <h5 class="decalaration">Declaration</h5>
  262. <div class="codewrapper">
  263. <pre><code class="lang-csharp hljs">public Action Action { get; set; }</code></pre>
  264. </div>
  265. <h5 class="propertyValue">Property Value</h5>
  266. <table class="table table-bordered table-striped table-condensed">
  267. <thead>
  268. <tr>
  269. <th>Type</th>
  270. <th>Description</th>
  271. </tr>
  272. </thead>
  273. <tbody>
  274. <tr>
  275. <td><span class="xref">System.Action</span></td>
  276. <td>Method to invoke.</td>
  277. </tr>
  278. </tbody>
  279. </table>
  280. <span class="small pull-right mobile-hide">
  281. <span class="divider">|</span>
  282. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  283. </span>
  284. <span class="small pull-right mobile-hide">
  285. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L134">View Source</a>
  286. </span>
  287. <a id="Terminal_Gui_MenuItem_CanExecute_" data-uid="Terminal.Gui.MenuItem.CanExecute*"></a>
  288. <h4 id="Terminal_Gui_MenuItem_CanExecute" data-uid="Terminal.Gui.MenuItem.CanExecute">CanExecute</h4>
  289. <div class="markdown level1 summary">
  290. Gets or sets the action to be invoked if the menu can be triggered
  291. </div>
  292. <div class="markdown level1 conceptual"></div>
  293. <h5 class="decalaration">Declaration</h5>
  294. <div class="codewrapper">
  295. <pre><code class="lang-csharp hljs">public Func&lt;bool&gt; CanExecute { get; set; }</code></pre>
  296. </div>
  297. <h5 class="propertyValue">Property Value</h5>
  298. <table class="table table-bordered table-striped table-condensed">
  299. <thead>
  300. <tr>
  301. <th>Type</th>
  302. <th>Description</th>
  303. </tr>
  304. </thead>
  305. <tbody>
  306. <tr>
  307. <td><span class="xref">System.Func</span>&lt;<span class="xref">System.Boolean</span>&gt;</td>
  308. <td>Function to determine if action is ready to be executed.</td>
  309. </tr>
  310. </tbody>
  311. </table>
  312. <span class="small pull-right mobile-hide">
  313. <span class="divider">|</span>
  314. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  315. </span>
  316. <span class="small pull-right mobile-hide">
  317. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L151">View Source</a>
  318. </span>
  319. <a id="Terminal_Gui_MenuItem_Checked_" data-uid="Terminal.Gui.MenuItem.Checked*"></a>
  320. <h4 id="Terminal_Gui_MenuItem_Checked" data-uid="Terminal.Gui.MenuItem.Checked">Checked</h4>
  321. <div class="markdown level1 summary">
  322. 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>.
  323. </div>
  324. <div class="markdown level1 conceptual"></div>
  325. <h5 class="decalaration">Declaration</h5>
  326. <div class="codewrapper">
  327. <pre><code class="lang-csharp hljs">public bool Checked { get; set; }</code></pre>
  328. </div>
  329. <h5 class="propertyValue">Property Value</h5>
  330. <table class="table table-bordered table-striped table-condensed">
  331. <thead>
  332. <tr>
  333. <th>Type</th>
  334. <th>Description</th>
  335. </tr>
  336. </thead>
  337. <tbody>
  338. <tr>
  339. <td><span class="xref">System.Boolean</span></td>
  340. <td></td>
  341. </tr>
  342. </tbody>
  343. </table>
  344. <span class="small pull-right mobile-hide">
  345. <span class="divider">|</span>
  346. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  347. </span>
  348. <span class="small pull-right mobile-hide">
  349. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L156">View Source</a>
  350. </span>
  351. <a id="Terminal_Gui_MenuItem_CheckType_" data-uid="Terminal.Gui.MenuItem.CheckType*"></a>
  352. <h4 id="Terminal_Gui_MenuItem_CheckType" data-uid="Terminal.Gui.MenuItem.CheckType">CheckType</h4>
  353. <div class="markdown level1 summary">
  354. Sets or gets the type selection indicator the menu item will be displayed with.
  355. </div>
  356. <div class="markdown level1 conceptual"></div>
  357. <h5 class="decalaration">Declaration</h5>
  358. <div class="codewrapper">
  359. <pre><code class="lang-csharp hljs">public MenuItemCheckStyle CheckType { get; set; }</code></pre>
  360. </div>
  361. <h5 class="propertyValue">Property Value</h5>
  362. <table class="table table-bordered table-striped table-condensed">
  363. <thead>
  364. <tr>
  365. <th>Type</th>
  366. <th>Description</th>
  367. </tr>
  368. </thead>
  369. <tbody>
  370. <tr>
  371. <td><a class="xref" href="Terminal.Gui.MenuItemCheckStyle.html">MenuItemCheckStyle</a></td>
  372. <td></td>
  373. </tr>
  374. </tbody>
  375. </table>
  376. <span class="small pull-right mobile-hide">
  377. <span class="divider">|</span>
  378. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  379. </span>
  380. <span class="small pull-right mobile-hide">
  381. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L51">View Source</a>
  382. </span>
  383. <a id="Terminal_Gui_MenuItem_Data_" data-uid="Terminal.Gui.MenuItem.Data*"></a>
  384. <h4 id="Terminal_Gui_MenuItem_Data" data-uid="Terminal.Gui.MenuItem.Data">Data</h4>
  385. <div class="markdown level1 summary">
  386. Gets or sets arbitrary data for the menu item.
  387. </div>
  388. <div class="markdown level1 conceptual"></div>
  389. <h5 class="decalaration">Declaration</h5>
  390. <div class="codewrapper">
  391. <pre><code class="lang-csharp hljs">public object Data { get; set; }</code></pre>
  392. </div>
  393. <h5 class="propertyValue">Property Value</h5>
  394. <table class="table table-bordered table-striped table-condensed">
  395. <thead>
  396. <tr>
  397. <th>Type</th>
  398. <th>Description</th>
  399. </tr>
  400. </thead>
  401. <tbody>
  402. <tr>
  403. <td><span class="xref">System.Object</span></td>
  404. <td></td>
  405. </tr>
  406. </tbody>
  407. </table>
  408. <span class="small pull-right mobile-hide">
  409. <span class="divider">|</span>
  410. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  411. </span>
  412. <span class="small pull-right mobile-hide">
  413. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L122">View Source</a>
  414. </span>
  415. <a id="Terminal_Gui_MenuItem_Help_" data-uid="Terminal.Gui.MenuItem.Help*"></a>
  416. <h4 id="Terminal_Gui_MenuItem_Help" data-uid="Terminal.Gui.MenuItem.Help">Help</h4>
  417. <div class="markdown level1 summary">
  418. Gets or sets the help text for the menu item.
  419. </div>
  420. <div class="markdown level1 conceptual"></div>
  421. <h5 class="decalaration">Declaration</h5>
  422. <div class="codewrapper">
  423. <pre><code class="lang-csharp hljs">public ustring Help { get; set; }</code></pre>
  424. </div>
  425. <h5 class="propertyValue">Property Value</h5>
  426. <table class="table table-bordered table-striped table-condensed">
  427. <thead>
  428. <tr>
  429. <th>Type</th>
  430. <th>Description</th>
  431. </tr>
  432. </thead>
  433. <tbody>
  434. <tr>
  435. <td><span class="xref">NStack.ustring</span></td>
  436. <td>The help text.</td>
  437. </tr>
  438. </tbody>
  439. </table>
  440. <span class="small pull-right mobile-hide">
  441. <span class="divider">|</span>
  442. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  443. </span>
  444. <span class="small pull-right mobile-hide">
  445. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L162">View Source</a>
  446. </span>
  447. <a id="Terminal_Gui_MenuItem_Parent_" data-uid="Terminal.Gui.MenuItem.Parent*"></a>
  448. <h4 id="Terminal_Gui_MenuItem_Parent" data-uid="Terminal.Gui.MenuItem.Parent">Parent</h4>
  449. <div class="markdown level1 summary">
  450. Gets or sets the parent for this <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>.
  451. </div>
  452. <div class="markdown level1 conceptual"></div>
  453. <h5 class="decalaration">Declaration</h5>
  454. <div class="codewrapper">
  455. <pre><code class="lang-csharp hljs">public MenuItem Parent { get; }</code></pre>
  456. </div>
  457. <h5 class="propertyValue">Property Value</h5>
  458. <table class="table table-bordered table-striped table-condensed">
  459. <thead>
  460. <tr>
  461. <th>Type</th>
  462. <th>Description</th>
  463. </tr>
  464. </thead>
  465. <tbody>
  466. <tr>
  467. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a></td>
  468. <td>The parent.</td>
  469. </tr>
  470. </tbody>
  471. </table>
  472. <span class="small pull-right mobile-hide">
  473. <span class="divider">|</span>
  474. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  475. </span>
  476. <span class="small pull-right mobile-hide">
  477. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L90">View Source</a>
  478. </span>
  479. <a id="Terminal_Gui_MenuItem_Shortcut_" data-uid="Terminal.Gui.MenuItem.Shortcut*"></a>
  480. <h4 id="Terminal_Gui_MenuItem_Shortcut" data-uid="Terminal.Gui.MenuItem.Shortcut">Shortcut</h4>
  481. <div class="markdown level1 summary">
  482. This is the global setting that can be used as a global <a class="xref" href="Terminal.Gui.ShortcutHelper.html#Terminal_Gui_ShortcutHelper_Shortcut">Shortcut</a> to invoke the action on the menu.
  483. </div>
  484. <div class="markdown level1 conceptual"></div>
  485. <h5 class="decalaration">Declaration</h5>
  486. <div class="codewrapper">
  487. <pre><code class="lang-csharp hljs">public Key Shortcut { get; set; }</code></pre>
  488. </div>
  489. <h5 class="propertyValue">Property Value</h5>
  490. <table class="table table-bordered table-striped table-condensed">
  491. <thead>
  492. <tr>
  493. <th>Type</th>
  494. <th>Description</th>
  495. </tr>
  496. </thead>
  497. <tbody>
  498. <tr>
  499. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  500. <td></td>
  501. </tr>
  502. </tbody>
  503. </table>
  504. <span class="small pull-right mobile-hide">
  505. <span class="divider">|</span>
  506. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  507. </span>
  508. <span class="small pull-right mobile-hide">
  509. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L102">View Source</a>
  510. </span>
  511. <a id="Terminal_Gui_MenuItem_ShortcutTag_" data-uid="Terminal.Gui.MenuItem.ShortcutTag*"></a>
  512. <h4 id="Terminal_Gui_MenuItem_ShortcutTag" data-uid="Terminal.Gui.MenuItem.ShortcutTag">ShortcutTag</h4>
  513. <div class="markdown level1 summary">
  514. The keystroke combination used in the <a class="xref" href="Terminal.Gui.ShortcutHelper.html#Terminal_Gui_ShortcutHelper_ShortcutTag">ShortcutTag</a> as string.
  515. </div>
  516. <div class="markdown level1 conceptual"></div>
  517. <h5 class="decalaration">Declaration</h5>
  518. <div class="codewrapper">
  519. <pre><code class="lang-csharp hljs">public ustring ShortcutTag { get; }</code></pre>
  520. </div>
  521. <h5 class="propertyValue">Property Value</h5>
  522. <table class="table table-bordered table-striped table-condensed">
  523. <thead>
  524. <tr>
  525. <th>Type</th>
  526. <th>Description</th>
  527. </tr>
  528. </thead>
  529. <tbody>
  530. <tr>
  531. <td><span class="xref">NStack.ustring</span></td>
  532. <td></td>
  533. </tr>
  534. </tbody>
  535. </table>
  536. <span class="small pull-right mobile-hide">
  537. <span class="divider">|</span>
  538. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  539. </span>
  540. <span class="small pull-right mobile-hide">
  541. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L108">View Source</a>
  542. </span>
  543. <a id="Terminal_Gui_MenuItem_Title_" data-uid="Terminal.Gui.MenuItem.Title*"></a>
  544. <h4 id="Terminal_Gui_MenuItem_Title" data-uid="Terminal.Gui.MenuItem.Title">Title</h4>
  545. <div class="markdown level1 summary">
  546. Gets or sets the title.
  547. </div>
  548. <div class="markdown level1 conceptual"></div>
  549. <h5 class="decalaration">Declaration</h5>
  550. <div class="codewrapper">
  551. <pre><code class="lang-csharp hljs">public ustring Title { get; set; }</code></pre>
  552. </div>
  553. <h5 class="propertyValue">Property Value</h5>
  554. <table class="table table-bordered table-striped table-condensed">
  555. <thead>
  556. <tr>
  557. <th>Type</th>
  558. <th>Description</th>
  559. </tr>
  560. </thead>
  561. <tbody>
  562. <tr>
  563. <td><span class="xref">NStack.ustring</span></td>
  564. <td>The title.</td>
  565. </tr>
  566. </tbody>
  567. </table>
  568. <h3 id="methods">Methods
  569. </h3>
  570. <span class="small pull-right mobile-hide">
  571. <span class="divider">|</span>
  572. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  573. </span>
  574. <span class="small pull-right mobile-hide">
  575. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L180">View Source</a>
  576. </span>
  577. <a id="Terminal_Gui_MenuItem_GetMenuBarItem_" data-uid="Terminal.Gui.MenuItem.GetMenuBarItem*"></a>
  578. <h4 id="Terminal_Gui_MenuItem_GetMenuBarItem" data-uid="Terminal.Gui.MenuItem.GetMenuBarItem">GetMenuBarItem()</h4>
  579. <div class="markdown level1 summary">
  580. Merely a debugging aid to see the interaction with main
  581. </div>
  582. <div class="markdown level1 conceptual"></div>
  583. <h5 class="decalaration">Declaration</h5>
  584. <div class="codewrapper">
  585. <pre><code class="lang-csharp hljs">public bool GetMenuBarItem()</code></pre>
  586. </div>
  587. <h5 class="returns">Returns</h5>
  588. <table class="table table-bordered table-striped table-condensed">
  589. <thead>
  590. <tr>
  591. <th>Type</th>
  592. <th>Description</th>
  593. </tr>
  594. </thead>
  595. <tbody>
  596. <tr>
  597. <td><span class="xref">System.Boolean</span></td>
  598. <td></td>
  599. </tr>
  600. </tbody>
  601. </table>
  602. <span class="small pull-right mobile-hide">
  603. <span class="divider">|</span>
  604. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  605. </span>
  606. <span class="small pull-right mobile-hide">
  607. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L172">View Source</a>
  608. </span>
  609. <a id="Terminal_Gui_MenuItem_GetMenuItem_" data-uid="Terminal.Gui.MenuItem.GetMenuItem*"></a>
  610. <h4 id="Terminal_Gui_MenuItem_GetMenuItem" data-uid="Terminal.Gui.MenuItem.GetMenuItem">GetMenuItem()</h4>
  611. <div class="markdown level1 summary">
  612. Merely a debugging aid to see the interaction with main
  613. </div>
  614. <div class="markdown level1 conceptual"></div>
  615. <h5 class="decalaration">Declaration</h5>
  616. <div class="codewrapper">
  617. <pre><code class="lang-csharp hljs">public MenuItem GetMenuItem()</code></pre>
  618. </div>
  619. <h5 class="returns">Returns</h5>
  620. <table class="table table-bordered table-striped table-condensed">
  621. <thead>
  622. <tr>
  623. <th>Type</th>
  624. <th>Description</th>
  625. </tr>
  626. </thead>
  627. <tbody>
  628. <tr>
  629. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a></td>
  630. <td></td>
  631. </tr>
  632. </tbody>
  633. </table>
  634. <span class="small pull-right mobile-hide">
  635. <span class="divider">|</span>
  636. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  637. </span>
  638. <span class="small pull-right mobile-hide">
  639. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L139">View Source</a>
  640. </span>
  641. <a id="Terminal_Gui_MenuItem_IsEnabled_" data-uid="Terminal.Gui.MenuItem.IsEnabled*"></a>
  642. <h4 id="Terminal_Gui_MenuItem_IsEnabled" data-uid="Terminal.Gui.MenuItem.IsEnabled">IsEnabled()</h4>
  643. <div class="markdown level1 summary">
  644. Shortcut to check if the menu item is enabled
  645. </div>
  646. <div class="markdown level1 conceptual"></div>
  647. <h5 class="decalaration">Declaration</h5>
  648. <div class="codewrapper">
  649. <pre><code class="lang-csharp hljs">public bool IsEnabled()</code></pre>
  650. </div>
  651. <h5 class="returns">Returns</h5>
  652. <table class="table table-bordered table-striped table-condensed">
  653. <thead>
  654. <tr>
  655. <th>Type</th>
  656. <th>Description</th>
  657. </tr>
  658. </thead>
  659. <tbody>
  660. <tr>
  661. <td><span class="xref">System.Boolean</span></td>
  662. <td></td>
  663. </tr>
  664. </tbody>
  665. </table>
  666. </article>
  667. </div>
  668. <div class="hidden-sm col-md-2" role="complementary">
  669. <div class="sideaffix">
  670. <div class="contribution">
  671. <ul class="nav">
  672. <li>
  673. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/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>
  674. </li>
  675. <li>
  676. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/Menu.cs/#L42" class="contribution-link">View Source</a>
  677. </li>
  678. </ul>
  679. </div>
  680. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  681. <h5>In This Article</h5>
  682. <div></div>
  683. </nav>
  684. </div>
  685. </div>
  686. </div>
  687. </div>
  688. <footer>
  689. <div class="grad-bottom"></div>
  690. <div class="footer">
  691. <div class="container">
  692. <span class="pull-right">
  693. <a href="#top">Back to top</a>
  694. </span>
  695. <span>Generated by <strong>DocFX</strong></span>
  696. </div>
  697. </div>
  698. </footer>
  699. </div>
  700. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  701. <script type="text/javascript" src="../../styles/docfx.js"></script>
  702. <script type="text/javascript" src="../../styles/main.js"></script>
  703. </body>
  704. </html>