Terminal.Gui.MenuBarItem.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  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 MenuBarItem
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class MenuBarItem
  11. ">
  12. <link rel="shortcut icon" href="../../favicon.ico">
  13. <link rel="stylesheet" href="../../styles/docfx.vendor.min.css">
  14. <link rel="stylesheet" href="../../styles/docfx.css">
  15. <link rel="stylesheet" href="../../styles/main.css">
  16. <meta property="docfx:navrel" content="../../toc.html">
  17. <meta property="docfx:tocrel" content="toc.html">
  18. <meta property="docfx:rel" content="../../">
  19. </head>
  20. <body data-spy="scroll" data-target="#affix" data-offset="120">
  21. <div id="wrapper">
  22. <header>
  23. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  24. <div class="container">
  25. <div class="navbar-header">
  26. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  27. <span class="sr-only">Toggle navigation</span>
  28. <span class="icon-bar"></span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. </button>
  32. <a class="navbar-brand" href="../../index.html">
  33. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  34. </a>
  35. </div>
  36. <div class="collapse navbar-collapse" id="navbar">
  37. <form class="navbar-form navbar-right" role="search" id="search">
  38. <div class="form-group">
  39. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  40. </div>
  41. </form>
  42. </div>
  43. </div>
  44. </nav>
  45. <div class="subnav navbar navbar-default">
  46. <div class="container hide-when-search" id="breadcrumb">
  47. <ul class="breadcrumb">
  48. <li></li>
  49. </ul>
  50. </div>
  51. </div>
  52. </header>
  53. <div class="container body-content">
  54. <div id="search-results">
  55. <div class="search-list">Search Results for <span></span></div>
  56. <div class="sr-items">
  57. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  58. </div>
  59. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  60. </div>
  61. </div>
  62. <div role="main" class="container body-content hide-when-search">
  63. <div class="sidenav hide-when-search">
  64. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  65. <div class="sidetoggle collapse" id="sidetoggle">
  66. <div id="sidetoc"></div>
  67. </div>
  68. </div>
  69. <div class="article row grid-right">
  70. <div class="col-md-10">
  71. <article class="content wrap" id="_content" data-uid="Terminal.Gui.MenuBarItem">
  72. <h1 id="Terminal_Gui_MenuBarItem" data-uid="Terminal.Gui.MenuBarItem" class="text-break">Class MenuBarItem
  73. </h1>
  74. <div class="markdown level0 summary"><a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a> is a menu item on an app's <a class="xref" href="Terminal.Gui.MenuBar.html">MenuBar</a>.
  75. MenuBarItems do not support <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Shortcut">Shortcut</a>.</div>
  76. <div class="markdown level0 conceptual"></div>
  77. <div class="inheritance">
  78. <h5>Inheritance</h5>
  79. <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
  80. <div class="level1"><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a></div>
  81. <div class="level2"><span class="xref">MenuBarItem</span></div>
  82. </div>
  83. <div class="inheritedMembers">
  84. <h5>Inherited Members</h5>
  85. <div>
  86. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Data">MenuItem.Data</a>
  87. </div>
  88. <div>
  89. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_HotKey">MenuItem.HotKey</a>
  90. </div>
  91. <div>
  92. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Shortcut">MenuItem.Shortcut</a>
  93. </div>
  94. <div>
  95. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_ShortcutTag">MenuItem.ShortcutTag</a>
  96. </div>
  97. <div>
  98. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Title">MenuItem.Title</a>
  99. </div>
  100. <div>
  101. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Help">MenuItem.Help</a>
  102. </div>
  103. <div>
  104. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Action">MenuItem.Action</a>
  105. </div>
  106. <div>
  107. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_CanExecute">MenuItem.CanExecute</a>
  108. </div>
  109. <div>
  110. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_IsEnabled">MenuItem.IsEnabled()</a>
  111. </div>
  112. <div>
  113. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Checked">MenuItem.Checked</a>
  114. </div>
  115. <div>
  116. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_CheckType">MenuItem.CheckType</a>
  117. </div>
  118. <div>
  119. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_Parent">MenuItem.Parent</a>
  120. </div>
  121. <div>
  122. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_GetMenuItem">MenuItem.GetMenuItem()</a>
  123. </div>
  124. <div>
  125. <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_GetMenuBarItem">MenuItem.GetMenuBarItem()</a>
  126. </div>
  127. <div>
  128. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
  129. </div>
  130. <div>
  131. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
  132. </div>
  133. <div>
  134. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
  135. </div>
  136. <div>
  137. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
  138. </div>
  139. <div>
  140. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
  141. </div>
  142. <div>
  143. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
  144. </div>
  145. <div>
  146. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
  147. </div>
  148. </div>
  149. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.html">Terminal</a>.<a class="xref" href="Terminal.Gui.html">Gui</a></h6>
  150. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  151. <h5 id="Terminal_Gui_MenuBarItem_syntax">Syntax</h5>
  152. <div class="codewrapper">
  153. <pre><code class="lang-csharp hljs">public class MenuBarItem : MenuItem</code></pre>
  154. </div>
  155. <h3 id="constructors">Constructors
  156. </h3>
  157. <span class="small pull-right mobile-hide">
  158. <span class="divider">|</span>
  159. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBarItem__ctor.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBarItem.%23ctor%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  160. </span>
  161. <span class="small pull-right mobile-hide">
  162. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L281">View Source</a>
  163. </span>
  164. <a id="Terminal_Gui_MenuBarItem__ctor_" data-uid="Terminal.Gui.MenuBarItem.#ctor*"></a>
  165. <h4 id="Terminal_Gui_MenuBarItem__ctor" data-uid="Terminal.Gui.MenuBarItem.#ctor">MenuBarItem()</h4>
  166. <div class="markdown level1 summary">Initializes a new <a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a>.</div>
  167. <div class="markdown level1 conceptual"></div>
  168. <h5 class="declaration">Declaration</h5>
  169. <div class="codewrapper">
  170. <pre><code class="lang-csharp hljs">public MenuBarItem()</code></pre>
  171. </div>
  172. <span class="small pull-right mobile-hide">
  173. <span class="divider">|</span>
  174. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBarItem__ctor_NStack_ustring_NStack_ustring_System_Action_System_Func_System_Boolean__Terminal_Gui_MenuItem_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBarItem.%23ctor(NStack.ustring%2CNStack.ustring%2CSystem.Action%2CSystem.Func%7BSystem.Boolean%7D%2CTerminal.Gui.MenuItem)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  175. </span>
  176. <span class="small pull-right mobile-hide">
  177. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L245">View Source</a>
  178. </span>
  179. <a id="Terminal_Gui_MenuBarItem__ctor_" data-uid="Terminal.Gui.MenuBarItem.#ctor*"></a>
  180. <h4 id="Terminal_Gui_MenuBarItem__ctor_NStack_ustring_NStack_ustring_System_Action_System_Func_System_Boolean__Terminal_Gui_MenuItem_" data-uid="Terminal.Gui.MenuBarItem.#ctor(NStack.ustring,NStack.ustring,System.Action,System.Func{System.Boolean},Terminal.Gui.MenuItem)">MenuBarItem(ustring, ustring, Action, Func&lt;bool&gt;, MenuItem)</h4>
  181. <div class="markdown level1 summary">Initializes a new <a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a> as a <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>.</div>
  182. <div class="markdown level1 conceptual"></div>
  183. <h5 class="declaration">Declaration</h5>
  184. <div class="codewrapper">
  185. <pre><code class="lang-csharp hljs">public MenuBarItem(ustring title, ustring help, Action action, Func&lt;bool&gt; canExecute = null, MenuItem parent = null)</code></pre>
  186. </div>
  187. <h5 class="parameters">Parameters</h5>
  188. <table class="table table-bordered table-condensed">
  189. <thead>
  190. <tr>
  191. <th>Type</th>
  192. <th>Name</th>
  193. <th>Description</th>
  194. </tr>
  195. </thead>
  196. <tbody>
  197. <tr>
  198. <td><span class="xref">ustring</span></td>
  199. <td><span class="parametername">title</span></td>
  200. <td>Title for the menu item.</td>
  201. </tr>
  202. <tr>
  203. <td><span class="xref">ustring</span></td>
  204. <td><span class="parametername">help</span></td>
  205. <td>Help text to display. Will be displayed next to the Title surrounded by parentheses.</td>
  206. </tr>
  207. <tr>
  208. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action">Action</a></td>
  209. <td><span class="parametername">action</span></td>
  210. <td>Action to invoke when the menu item is activated.</td>
  211. </tr>
  212. <tr>
  213. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>&gt;</td>
  214. <td><span class="parametername">canExecute</span></td>
  215. <td>Function to determine if the action can currently be executed.</td>
  216. </tr>
  217. <tr>
  218. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a></td>
  219. <td><span class="parametername">parent</span></td>
  220. <td>The parent <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a> of this if exist, otherwise is null.</td>
  221. </tr>
  222. </tbody>
  223. </table>
  224. <span class="small pull-right mobile-hide">
  225. <span class="divider">|</span>
  226. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBarItem__ctor_NStack_ustring_System_Collections_Generic_List_Terminal_Gui_MenuItem____Terminal_Gui_MenuItem_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBarItem.%23ctor(NStack.ustring%2CSystem.Collections.Generic.List%7BTerminal.Gui.MenuItem%5B%5D%7D%2CTerminal.Gui.MenuItem)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  227. </span>
  228. <span class="small pull-right mobile-hide">
  229. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L267">View Source</a>
  230. </span>
  231. <a id="Terminal_Gui_MenuBarItem__ctor_" data-uid="Terminal.Gui.MenuBarItem.#ctor*"></a>
  232. <h4 id="Terminal_Gui_MenuBarItem__ctor_NStack_ustring_System_Collections_Generic_List_Terminal_Gui_MenuItem____Terminal_Gui_MenuItem_" data-uid="Terminal.Gui.MenuBarItem.#ctor(NStack.ustring,System.Collections.Generic.List{Terminal.Gui.MenuItem[]},Terminal.Gui.MenuItem)">MenuBarItem(ustring, List&lt;MenuItem[]&gt;, MenuItem)</h4>
  233. <div class="markdown level1 summary">Initializes a new <a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a> with separate list of items.</div>
  234. <div class="markdown level1 conceptual"></div>
  235. <h5 class="declaration">Declaration</h5>
  236. <div class="codewrapper">
  237. <pre><code class="lang-csharp hljs">public MenuBarItem(ustring title, List&lt;MenuItem[]&gt; children, MenuItem parent = null)</code></pre>
  238. </div>
  239. <h5 class="parameters">Parameters</h5>
  240. <table class="table table-bordered table-condensed">
  241. <thead>
  242. <tr>
  243. <th>Type</th>
  244. <th>Name</th>
  245. <th>Description</th>
  246. </tr>
  247. </thead>
  248. <tbody>
  249. <tr>
  250. <td><span class="xref">ustring</span></td>
  251. <td><span class="parametername">title</span></td>
  252. <td>Title for the menu item.</td>
  253. </tr>
  254. <tr>
  255. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>[]&gt;</td>
  256. <td><span class="parametername">children</span></td>
  257. <td>The list of items in the current menu.</td>
  258. </tr>
  259. <tr>
  260. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a></td>
  261. <td><span class="parametername">parent</span></td>
  262. <td>The parent <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a> of this if exist, otherwise is null.</td>
  263. </tr>
  264. </tbody>
  265. </table>
  266. <span class="small pull-right mobile-hide">
  267. <span class="divider">|</span>
  268. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBarItem__ctor_NStack_ustring_Terminal_Gui_MenuItem___Terminal_Gui_MenuItem_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBarItem.%23ctor(NStack.ustring%2CTerminal.Gui.MenuItem%5B%5D%2CTerminal.Gui.MenuItem)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  269. </span>
  270. <span class="small pull-right mobile-hide">
  271. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L256">View Source</a>
  272. </span>
  273. <a id="Terminal_Gui_MenuBarItem__ctor_" data-uid="Terminal.Gui.MenuBarItem.#ctor*"></a>
  274. <h4 id="Terminal_Gui_MenuBarItem__ctor_NStack_ustring_Terminal_Gui_MenuItem___Terminal_Gui_MenuItem_" data-uid="Terminal.Gui.MenuBarItem.#ctor(NStack.ustring,Terminal.Gui.MenuItem[],Terminal.Gui.MenuItem)">MenuBarItem(ustring, MenuItem[], MenuItem)</h4>
  275. <div class="markdown level1 summary">Initializes a new <a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a>.</div>
  276. <div class="markdown level1 conceptual"></div>
  277. <h5 class="declaration">Declaration</h5>
  278. <div class="codewrapper">
  279. <pre><code class="lang-csharp hljs">public MenuBarItem(ustring title, MenuItem[] children, MenuItem parent = null)</code></pre>
  280. </div>
  281. <h5 class="parameters">Parameters</h5>
  282. <table class="table table-bordered table-condensed">
  283. <thead>
  284. <tr>
  285. <th>Type</th>
  286. <th>Name</th>
  287. <th>Description</th>
  288. </tr>
  289. </thead>
  290. <tbody>
  291. <tr>
  292. <td><span class="xref">ustring</span></td>
  293. <td><span class="parametername">title</span></td>
  294. <td>Title for the menu item.</td>
  295. </tr>
  296. <tr>
  297. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>[]</td>
  298. <td><span class="parametername">children</span></td>
  299. <td>The items in the current menu.</td>
  300. </tr>
  301. <tr>
  302. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a></td>
  303. <td><span class="parametername">parent</span></td>
  304. <td>The parent <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a> of this if exist, otherwise is null.</td>
  305. </tr>
  306. </tbody>
  307. </table>
  308. <span class="small pull-right mobile-hide">
  309. <span class="divider">|</span>
  310. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBarItem__ctor_Terminal_Gui_MenuItem___.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBarItem.%23ctor(Terminal.Gui.MenuItem%5B%5D)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  311. </span>
  312. <span class="small pull-right mobile-hide">
  313. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L276">View Source</a>
  314. </span>
  315. <a id="Terminal_Gui_MenuBarItem__ctor_" data-uid="Terminal.Gui.MenuBarItem.#ctor*"></a>
  316. <h4 id="Terminal_Gui_MenuBarItem__ctor_Terminal_Gui_MenuItem___" data-uid="Terminal.Gui.MenuBarItem.#ctor(Terminal.Gui.MenuItem[])">MenuBarItem(MenuItem[])</h4>
  317. <div class="markdown level1 summary">Initializes a new <a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a>.</div>
  318. <div class="markdown level1 conceptual"></div>
  319. <h5 class="declaration">Declaration</h5>
  320. <div class="codewrapper">
  321. <pre><code class="lang-csharp hljs">public MenuBarItem(MenuItem[] children)</code></pre>
  322. </div>
  323. <h5 class="parameters">Parameters</h5>
  324. <table class="table table-bordered table-condensed">
  325. <thead>
  326. <tr>
  327. <th>Type</th>
  328. <th>Name</th>
  329. <th>Description</th>
  330. </tr>
  331. </thead>
  332. <tbody>
  333. <tr>
  334. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>[]</td>
  335. <td><span class="parametername">children</span></td>
  336. <td>The items in the current menu.</td>
  337. </tr>
  338. </tbody>
  339. </table>
  340. <h3 id="properties">Properties
  341. </h3>
  342. <span class="small pull-right mobile-hide">
  343. <span class="divider">|</span>
  344. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBarItem_Children.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBarItem.Children%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  345. </span>
  346. <span class="small pull-right mobile-hide">
  347. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L375">View Source</a>
  348. </span>
  349. <a id="Terminal_Gui_MenuBarItem_Children_" data-uid="Terminal.Gui.MenuBarItem.Children*"></a>
  350. <h4 id="Terminal_Gui_MenuBarItem_Children" data-uid="Terminal.Gui.MenuBarItem.Children">Children</h4>
  351. <div class="markdown level1 summary">Gets or sets an array of <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a> objects that are the children of this <a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a></div>
  352. <div class="markdown level1 conceptual"></div>
  353. <h5 class="declaration">Declaration</h5>
  354. <div class="codewrapper">
  355. <pre><code class="lang-csharp hljs">public MenuItem[] Children { get; set; }</code></pre>
  356. </div>
  357. <h5 class="propertyValue">Property Value</h5>
  358. <table class="table table-bordered table-condensed">
  359. <thead>
  360. <tr>
  361. <th>Type</th>
  362. <th>Description</th>
  363. </tr>
  364. </thead>
  365. <tbody>
  366. <tr>
  367. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>[]</td>
  368. <td>The children.</td>
  369. </tr>
  370. </tbody>
  371. </table>
  372. <h3 id="methods">Methods
  373. </h3>
  374. <span class="small pull-right mobile-hide">
  375. <span class="divider">|</span>
  376. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBarItem_GetChildrenIndex_Terminal_Gui_MenuItem_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBarItem.GetChildrenIndex(Terminal.Gui.MenuItem)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  377. </span>
  378. <span class="small pull-right mobile-hide">
  379. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L349">View Source</a>
  380. </span>
  381. <a id="Terminal_Gui_MenuBarItem_GetChildrenIndex_" data-uid="Terminal.Gui.MenuBarItem.GetChildrenIndex*"></a>
  382. <h4 id="Terminal_Gui_MenuBarItem_GetChildrenIndex_Terminal_Gui_MenuItem_" data-uid="Terminal.Gui.MenuBarItem.GetChildrenIndex(Terminal.Gui.MenuItem)">GetChildrenIndex(MenuItem)</h4>
  383. <div class="markdown level1 summary">Get the index of the <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a> parameter.</div>
  384. <div class="markdown level1 conceptual"></div>
  385. <h5 class="declaration">Declaration</h5>
  386. <div class="codewrapper">
  387. <pre><code class="lang-csharp hljs">public int GetChildrenIndex(MenuItem children)</code></pre>
  388. </div>
  389. <h5 class="parameters">Parameters</h5>
  390. <table class="table table-bordered table-condensed">
  391. <thead>
  392. <tr>
  393. <th>Type</th>
  394. <th>Name</th>
  395. <th>Description</th>
  396. </tr>
  397. </thead>
  398. <tbody>
  399. <tr>
  400. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a></td>
  401. <td><span class="parametername">children</span></td>
  402. <td></td>
  403. </tr>
  404. </tbody>
  405. </table>
  406. <h5 class="returns">Returns</h5>
  407. <table class="table table-bordered table-condensed">
  408. <thead>
  409. <tr>
  410. <th>Type</th>
  411. <th>Description</th>
  412. </tr>
  413. </thead>
  414. <tbody>
  415. <tr>
  416. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
  417. <td>Returns a value bigger than -1 if the <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a> is a child of this.</td>
  418. </tr>
  419. </tbody>
  420. </table>
  421. <span class="small pull-right mobile-hide">
  422. <span class="divider">|</span>
  423. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBarItem_IsSubMenuOf_Terminal_Gui_MenuItem_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBarItem.IsSubMenuOf(Terminal.Gui.MenuItem)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  424. </span>
  425. <span class="small pull-right mobile-hide">
  426. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L334">View Source</a>
  427. </span>
  428. <a id="Terminal_Gui_MenuBarItem_IsSubMenuOf_" data-uid="Terminal.Gui.MenuBarItem.IsSubMenuOf*"></a>
  429. <h4 id="Terminal_Gui_MenuBarItem_IsSubMenuOf_Terminal_Gui_MenuItem_" data-uid="Terminal.Gui.MenuBarItem.IsSubMenuOf(Terminal.Gui.MenuItem)">IsSubMenuOf(MenuItem)</h4>
  430. <div class="markdown level1 summary">Check if the <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a> parameter is a child of this.</div>
  431. <div class="markdown level1 conceptual"></div>
  432. <h5 class="declaration">Declaration</h5>
  433. <div class="codewrapper">
  434. <pre><code class="lang-csharp hljs">public bool IsSubMenuOf(MenuItem menuItem)</code></pre>
  435. </div>
  436. <h5 class="parameters">Parameters</h5>
  437. <table class="table table-bordered table-condensed">
  438. <thead>
  439. <tr>
  440. <th>Type</th>
  441. <th>Name</th>
  442. <th>Description</th>
  443. </tr>
  444. </thead>
  445. <tbody>
  446. <tr>
  447. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a></td>
  448. <td><span class="parametername">menuItem</span></td>
  449. <td></td>
  450. </tr>
  451. </tbody>
  452. </table>
  453. <h5 class="returns">Returns</h5>
  454. <table class="table table-bordered table-condensed">
  455. <thead>
  456. <tr>
  457. <th>Type</th>
  458. <th>Description</th>
  459. </tr>
  460. </thead>
  461. <tbody>
  462. <tr>
  463. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  464. <td>Returns <code>true</code> if it is a child of this. <code>false</code> otherwise.</td>
  465. </tr>
  466. </tbody>
  467. </table>
  468. <span class="small pull-right mobile-hide">
  469. <span class="divider">|</span>
  470. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBarItem_SubMenu_Terminal_Gui_MenuItem_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBarItem.SubMenu(Terminal.Gui.MenuItem)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  471. </span>
  472. <span class="small pull-right mobile-hide">
  473. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L324">View Source</a>
  474. </span>
  475. <a id="Terminal_Gui_MenuBarItem_SubMenu_" data-uid="Terminal.Gui.MenuBarItem.SubMenu*"></a>
  476. <h4 id="Terminal_Gui_MenuBarItem_SubMenu_Terminal_Gui_MenuItem_" data-uid="Terminal.Gui.MenuBarItem.SubMenu(Terminal.Gui.MenuItem)">SubMenu(MenuItem)</h4>
  477. <div class="markdown level1 summary">Check if the children parameter is a <a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a>.</div>
  478. <div class="markdown level1 conceptual"></div>
  479. <h5 class="declaration">Declaration</h5>
  480. <div class="codewrapper">
  481. <pre><code class="lang-csharp hljs">public MenuBarItem SubMenu(MenuItem children)</code></pre>
  482. </div>
  483. <h5 class="parameters">Parameters</h5>
  484. <table class="table table-bordered table-condensed">
  485. <thead>
  486. <tr>
  487. <th>Type</th>
  488. <th>Name</th>
  489. <th>Description</th>
  490. </tr>
  491. </thead>
  492. <tbody>
  493. <tr>
  494. <td><a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a></td>
  495. <td><span class="parametername">children</span></td>
  496. <td></td>
  497. </tr>
  498. </tbody>
  499. </table>
  500. <h5 class="returns">Returns</h5>
  501. <table class="table table-bordered table-condensed">
  502. <thead>
  503. <tr>
  504. <th>Type</th>
  505. <th>Description</th>
  506. </tr>
  507. </thead>
  508. <tbody>
  509. <tr>
  510. <td><a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a></td>
  511. <td>Returns a <a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a> or null otherwise.</td>
  512. </tr>
  513. </tbody>
  514. </table>
  515. </article>
  516. </div>
  517. <div class="hidden-sm col-md-2" role="complementary">
  518. <div class="sideaffix">
  519. <div class="contribution">
  520. <ul class="nav">
  521. <li>
  522. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBarItem.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBarItem%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Edit this page</a>
  523. </li>
  524. <li>
  525. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L236" class="contribution-link">View Source</a>
  526. </li>
  527. </ul>
  528. </div>
  529. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  530. <h5>In this article</h5>
  531. <div></div>
  532. </nav>
  533. </div>
  534. </div>
  535. </div>
  536. </div>
  537. <footer>
  538. <div class="grad-bottom"></div>
  539. <div class="footer">
  540. <div class="container">
  541. <span class="pull-right">
  542. <a href="#top">Back to top</a>
  543. </span>
  544. <span>Generated by <strong>DocFX</strong></span>
  545. </div>
  546. </div>
  547. </footer>
  548. </div>
  549. <script type="text/javascript" src="../../styles/docfx.vendor.min.js"></script>
  550. <script type="text/javascript" src="../../styles/docfx.js"></script>
  551. <script type="text/javascript" src="../../styles/main.js"></script>
  552. </body>
  553. </html>