Terminal.Gui.ContextMenu.html 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707
  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 ContextMenu
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class ContextMenu
  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.ContextMenu">
  74. <h1 id="Terminal_Gui_ContextMenu" data-uid="Terminal.Gui.ContextMenu" class="text-break">Class ContextMenu
  75. </h1>
  76. <div class="markdown level0 summary">
  77. ContextMenu provides a pop-up menu that can be positioned anywhere within a <a class="xref" href="Terminal.Gui.View.html">View</a>.
  78. ContextMenu is analogous to <a class="xref" href="Terminal.Gui.ContextMenu.html#Terminal_Gui_ContextMenu_MenuBar">MenuBar</a> and, once activated, works like a sub-menu
  79. of a <a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a> (but can be positioned anywhere).
  80. <p>
  81. By default, a ContextMenu with sub-menus is displayed in a cascading manner, where each sub-menu pops out of the ContextMenu frame
  82. (either to the right or left, depending on where the ContextMenu is relative to the edge of the screen). By setting
  83. <a class="xref" href="Terminal.Gui.ContextMenu.html#Terminal_Gui_ContextMenu_UseSubMenusSingleFrame">UseSubMenusSingleFrame</a> to <span class="xref">true</span>, this behavior can be changed such that all sub-menus are
  84. drawn within the ContextMenu frame.
  85. </p>
  86. <p>
  87. ContextMenus can be activated using the Shift-F10 key (by default; use the <a class="xref" href="Terminal.Gui.ContextMenu.html#Terminal_Gui_ContextMenu_Key">Key</a> to change to another key).
  88. </p>
  89. <p>
  90. Callers can cause the ContextMenu to be activated on a right-mouse click (or other interaction) by calling <a class="xref" href="Terminal.Gui.ContextMenu.html#Terminal_Gui_ContextMenu_Show">Show()</a>.
  91. </p>
  92. <p>
  93. ContextMenus are located using screen using screen coordinates and appear above all other Views.
  94. </p>
  95. </div>
  96. <div class="markdown level0 conceptual"></div>
  97. <div class="inheritance">
  98. <h5>Inheritance</h5>
  99. <div class="level0"><span class="xref">System.Object</span></div>
  100. <div class="level1"><span class="xref">ContextMenu</span></div>
  101. </div>
  102. <div class="implements">
  103. <h5>Implements</h5>
  104. <div><span class="xref">System.IDisposable</span></div>
  105. </div>
  106. <div class="inheritedMembers">
  107. <h5>Inherited Members</h5>
  108. <div>
  109. <span class="xref">System.Object.Equals(System.Object)</span>
  110. </div>
  111. <div>
  112. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  113. </div>
  114. <div>
  115. <span class="xref">System.Object.GetHashCode()</span>
  116. </div>
  117. <div>
  118. <span class="xref">System.Object.GetType()</span>
  119. </div>
  120. <div>
  121. <span class="xref">System.Object.MemberwiseClone()</span>
  122. </div>
  123. <div>
  124. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  125. </div>
  126. <div>
  127. <span class="xref">System.Object.ToString()</span>
  128. </div>
  129. </div>
  130. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  131. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  132. <h5 id="Terminal_Gui_ContextMenu_syntax">Syntax</h5>
  133. <div class="codewrapper">
  134. <pre><code class="lang-csharp hljs">public sealed class ContextMenu : IDisposable</code></pre>
  135. </div>
  136. <h3 id="constructors">Constructors
  137. </h3>
  138. <span class="small pull-right mobile-hide">
  139. <span class="divider">|</span>
  140. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu__ctor.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.%23ctor%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>
  141. </span>
  142. <span class="small pull-right mobile-hide">
  143. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L33">View Source</a>
  144. </span>
  145. <a id="Terminal_Gui_ContextMenu__ctor_" data-uid="Terminal.Gui.ContextMenu.#ctor*"></a>
  146. <h4 id="Terminal_Gui_ContextMenu__ctor" data-uid="Terminal.Gui.ContextMenu.#ctor">ContextMenu()</h4>
  147. <div class="markdown level1 summary">
  148. Initializes a context menu with no menu items.
  149. </div>
  150. <div class="markdown level1 conceptual"></div>
  151. <h5 class="decalaration">Declaration</h5>
  152. <div class="codewrapper">
  153. <pre><code class="lang-csharp hljs">public ContextMenu()</code></pre>
  154. </div>
  155. <span class="small pull-right mobile-hide">
  156. <span class="divider">|</span>
  157. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu__ctor_System_Int32_System_Int32_Terminal_Gui_MenuBarItem_.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.%23ctor(System.Int32%2CSystem.Int32%2CTerminal.Gui.MenuBarItem)%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>
  158. </span>
  159. <span class="small pull-right mobile-hide">
  160. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L52">View Source</a>
  161. </span>
  162. <a id="Terminal_Gui_ContextMenu__ctor_" data-uid="Terminal.Gui.ContextMenu.#ctor*"></a>
  163. <h4 id="Terminal_Gui_ContextMenu__ctor_System_Int32_System_Int32_Terminal_Gui_MenuBarItem_" data-uid="Terminal.Gui.ContextMenu.#ctor(System.Int32,System.Int32,Terminal.Gui.MenuBarItem)">ContextMenu(Int32, Int32, MenuBarItem)</h4>
  164. <div class="markdown level1 summary">
  165. Initializes a context menu with menu items at a specific screen location.
  166. </div>
  167. <div class="markdown level1 conceptual"></div>
  168. <h5 class="decalaration">Declaration</h5>
  169. <div class="codewrapper">
  170. <pre><code class="lang-csharp hljs">public ContextMenu(int x, int y, MenuBarItem menuItems)</code></pre>
  171. </div>
  172. <h5 class="parameters">Parameters</h5>
  173. <table class="table table-bordered table-striped table-condensed">
  174. <thead>
  175. <tr>
  176. <th>Type</th>
  177. <th>Name</th>
  178. <th>Description</th>
  179. </tr>
  180. </thead>
  181. <tbody>
  182. <tr>
  183. <td><span class="xref">System.Int32</span></td>
  184. <td><span class="parametername">x</span></td>
  185. <td>The left position (screen relative).</td>
  186. </tr>
  187. <tr>
  188. <td><span class="xref">System.Int32</span></td>
  189. <td><span class="parametername">y</span></td>
  190. <td>The top position (screen relative).</td>
  191. </tr>
  192. <tr>
  193. <td><a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a></td>
  194. <td><span class="parametername">menuItems</span></td>
  195. <td>The menu items.</td>
  196. </tr>
  197. </tbody>
  198. </table>
  199. <span class="small pull-right mobile-hide">
  200. <span class="divider">|</span>
  201. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu__ctor_Terminal_Gui_View_Terminal_Gui_MenuBarItem_.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.%23ctor(Terminal.Gui.View%2CTerminal.Gui.MenuBarItem)%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>
  202. </span>
  203. <span class="small pull-right mobile-hide">
  204. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L40">View Source</a>
  205. </span>
  206. <a id="Terminal_Gui_ContextMenu__ctor_" data-uid="Terminal.Gui.ContextMenu.#ctor*"></a>
  207. <h4 id="Terminal_Gui_ContextMenu__ctor_Terminal_Gui_View_Terminal_Gui_MenuBarItem_" data-uid="Terminal.Gui.ContextMenu.#ctor(Terminal.Gui.View,Terminal.Gui.MenuBarItem)">ContextMenu(View, MenuBarItem)</h4>
  208. <div class="markdown level1 summary">
  209. Initializes a context menu, with a <a class="xref" href="Terminal.Gui.View.html">View</a> specifiying the parent/hose of the menu.
  210. </div>
  211. <div class="markdown level1 conceptual"></div>
  212. <h5 class="decalaration">Declaration</h5>
  213. <div class="codewrapper">
  214. <pre><code class="lang-csharp hljs">public ContextMenu(View host, MenuBarItem menuItems)</code></pre>
  215. </div>
  216. <h5 class="parameters">Parameters</h5>
  217. <table class="table table-bordered table-striped table-condensed">
  218. <thead>
  219. <tr>
  220. <th>Type</th>
  221. <th>Name</th>
  222. <th>Description</th>
  223. </tr>
  224. </thead>
  225. <tbody>
  226. <tr>
  227. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  228. <td><span class="parametername">host</span></td>
  229. <td>The host view.</td>
  230. </tr>
  231. <tr>
  232. <td><a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a></td>
  233. <td><span class="parametername">menuItems</span></td>
  234. <td>The menu items for the context menu.</td>
  235. </tr>
  236. </tbody>
  237. </table>
  238. <h3 id="properties">Properties
  239. </h3>
  240. <span class="small pull-right mobile-hide">
  241. <span class="divider">|</span>
  242. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu_ForceMinimumPosToZero.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.ForceMinimumPosToZero%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>
  243. </span>
  244. <span class="small pull-right mobile-hide">
  245. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L229">View Source</a>
  246. </span>
  247. <a id="Terminal_Gui_ContextMenu_ForceMinimumPosToZero_" data-uid="Terminal.Gui.ContextMenu.ForceMinimumPosToZero*"></a>
  248. <h4 id="Terminal_Gui_ContextMenu_ForceMinimumPosToZero" data-uid="Terminal.Gui.ContextMenu.ForceMinimumPosToZero">ForceMinimumPosToZero</h4>
  249. <div class="markdown level1 summary">
  250. Sets or gets whether the context menu be forced to the right, ensuring it is not clipped, if the x position
  251. is less than zero. The default is <span class="xref">true</span> which means the context menu will be forced to the right.
  252. If set to <span class="xref">false</span>, the context menu will be clipped on the left if x is less than zero.
  253. </div>
  254. <div class="markdown level1 conceptual"></div>
  255. <h5 class="decalaration">Declaration</h5>
  256. <div class="codewrapper">
  257. <pre><code class="lang-csharp hljs">public bool ForceMinimumPosToZero { get; set; }</code></pre>
  258. </div>
  259. <h5 class="propertyValue">Property Value</h5>
  260. <table class="table table-bordered table-striped table-condensed">
  261. <thead>
  262. <tr>
  263. <th>Type</th>
  264. <th>Description</th>
  265. </tr>
  266. </thead>
  267. <tbody>
  268. <tr>
  269. <td><span class="xref">System.Boolean</span></td>
  270. <td></td>
  271. </tr>
  272. </tbody>
  273. </table>
  274. <span class="small pull-right mobile-hide">
  275. <span class="divider">|</span>
  276. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu_Host.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.Host%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>
  277. </span>
  278. <span class="small pull-right mobile-hide">
  279. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L222">View Source</a>
  280. </span>
  281. <a id="Terminal_Gui_ContextMenu_Host_" data-uid="Terminal.Gui.ContextMenu.Host*"></a>
  282. <h4 id="Terminal_Gui_ContextMenu_Host" data-uid="Terminal.Gui.ContextMenu.Host">Host</h4>
  283. <div class="markdown level1 summary">
  284. The host <a class="xref" href="Terminal.Gui.View.html">View</a> which position will be used,
  285. otherwise if it&apos;s null the container will be used.
  286. </div>
  287. <div class="markdown level1 conceptual"></div>
  288. <h5 class="decalaration">Declaration</h5>
  289. <div class="codewrapper">
  290. <pre><code class="lang-csharp hljs">public View Host { get; set; }</code></pre>
  291. </div>
  292. <h5 class="propertyValue">Property Value</h5>
  293. <table class="table table-bordered table-striped table-condensed">
  294. <thead>
  295. <tr>
  296. <th>Type</th>
  297. <th>Description</th>
  298. </tr>
  299. </thead>
  300. <tbody>
  301. <tr>
  302. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  303. <td></td>
  304. </tr>
  305. </tbody>
  306. </table>
  307. <span class="small pull-right mobile-hide">
  308. <span class="divider">|</span>
  309. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu_IsShow.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.IsShow%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>
  310. </span>
  311. <span class="small pull-right mobile-hide">
  312. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L216">View Source</a>
  313. </span>
  314. <a id="Terminal_Gui_ContextMenu_IsShow_" data-uid="Terminal.Gui.ContextMenu.IsShow*"></a>
  315. <h4 id="Terminal_Gui_ContextMenu_IsShow" data-uid="Terminal.Gui.ContextMenu.IsShow">IsShow</h4>
  316. <div class="markdown level1 summary">
  317. Gets whether the ContextMenu is showing or not.
  318. </div>
  319. <div class="markdown level1 conceptual"></div>
  320. <h5 class="decalaration">Declaration</h5>
  321. <div class="codewrapper">
  322. <pre><code class="lang-csharp hljs">public static bool IsShow { get; }</code></pre>
  323. </div>
  324. <h5 class="propertyValue">Property Value</h5>
  325. <table class="table table-bordered table-striped table-condensed">
  326. <thead>
  327. <tr>
  328. <th>Type</th>
  329. <th>Description</th>
  330. </tr>
  331. </thead>
  332. <tbody>
  333. <tr>
  334. <td><span class="xref">System.Boolean</span></td>
  335. <td></td>
  336. </tr>
  337. </tbody>
  338. </table>
  339. <span class="small pull-right mobile-hide">
  340. <span class="divider">|</span>
  341. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu_Key.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.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>
  342. </span>
  343. <span class="small pull-right mobile-hide">
  344. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L192">View Source</a>
  345. </span>
  346. <a id="Terminal_Gui_ContextMenu_Key_" data-uid="Terminal.Gui.ContextMenu.Key*"></a>
  347. <h4 id="Terminal_Gui_ContextMenu_Key" data-uid="Terminal.Gui.ContextMenu.Key">Key</h4>
  348. <div class="markdown level1 summary">
  349. <a class="xref" href="Terminal.Gui.Key.html">Key</a> specifies they keyboard key that will activate the context menu with the keyboard.
  350. </div>
  351. <div class="markdown level1 conceptual"></div>
  352. <h5 class="decalaration">Declaration</h5>
  353. <div class="codewrapper">
  354. <pre><code class="lang-csharp hljs">public Key Key { get; set; }</code></pre>
  355. </div>
  356. <h5 class="propertyValue">Property Value</h5>
  357. <table class="table table-bordered table-striped table-condensed">
  358. <thead>
  359. <tr>
  360. <th>Type</th>
  361. <th>Description</th>
  362. </tr>
  363. </thead>
  364. <tbody>
  365. <tr>
  366. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  367. <td></td>
  368. </tr>
  369. </tbody>
  370. </table>
  371. <span class="small pull-right mobile-hide">
  372. <span class="divider">|</span>
  373. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu_MenuBar.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.MenuBar%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>
  374. </span>
  375. <span class="small pull-right mobile-hide">
  376. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L234">View Source</a>
  377. </span>
  378. <a id="Terminal_Gui_ContextMenu_MenuBar_" data-uid="Terminal.Gui.ContextMenu.MenuBar*"></a>
  379. <h4 id="Terminal_Gui_ContextMenu_MenuBar" data-uid="Terminal.Gui.ContextMenu.MenuBar">MenuBar</h4>
  380. <div class="markdown level1 summary">
  381. Gets the <a class="xref" href="Terminal.Gui.MenuBar.html">MenuBar</a> that is hosting this context menu.
  382. </div>
  383. <div class="markdown level1 conceptual"></div>
  384. <h5 class="decalaration">Declaration</h5>
  385. <div class="codewrapper">
  386. <pre><code class="lang-csharp hljs">public MenuBar MenuBar { get; }</code></pre>
  387. </div>
  388. <h5 class="propertyValue">Property Value</h5>
  389. <table class="table table-bordered table-striped table-condensed">
  390. <thead>
  391. <tr>
  392. <th>Type</th>
  393. <th>Description</th>
  394. </tr>
  395. </thead>
  396. <tbody>
  397. <tr>
  398. <td><a class="xref" href="Terminal.Gui.MenuBar.html">MenuBar</a></td>
  399. <td></td>
  400. </tr>
  401. </tbody>
  402. </table>
  403. <span class="small pull-right mobile-hide">
  404. <span class="divider">|</span>
  405. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu_MenuItems.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.MenuItems%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>
  406. </span>
  407. <span class="small pull-right mobile-hide">
  408. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L187">View Source</a>
  409. </span>
  410. <a id="Terminal_Gui_ContextMenu_MenuItems_" data-uid="Terminal.Gui.ContextMenu.MenuItems*"></a>
  411. <h4 id="Terminal_Gui_ContextMenu_MenuItems" data-uid="Terminal.Gui.ContextMenu.MenuItems">MenuItems</h4>
  412. <div class="markdown level1 summary">
  413. Gets or sets the menu items for this context menu.
  414. </div>
  415. <div class="markdown level1 conceptual"></div>
  416. <h5 class="decalaration">Declaration</h5>
  417. <div class="codewrapper">
  418. <pre><code class="lang-csharp hljs">public MenuBarItem MenuItems { get; set; }</code></pre>
  419. </div>
  420. <h5 class="propertyValue">Property Value</h5>
  421. <table class="table table-bordered table-striped table-condensed">
  422. <thead>
  423. <tr>
  424. <th>Type</th>
  425. <th>Description</th>
  426. </tr>
  427. </thead>
  428. <tbody>
  429. <tr>
  430. <td><a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a></td>
  431. <td></td>
  432. </tr>
  433. </tbody>
  434. </table>
  435. <span class="small pull-right mobile-hide">
  436. <span class="divider">|</span>
  437. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu_MouseFlags.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.MouseFlags%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>
  438. </span>
  439. <span class="small pull-right mobile-hide">
  440. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L204">View Source</a>
  441. </span>
  442. <a id="Terminal_Gui_ContextMenu_MouseFlags_" data-uid="Terminal.Gui.ContextMenu.MouseFlags*"></a>
  443. <h4 id="Terminal_Gui_ContextMenu_MouseFlags" data-uid="Terminal.Gui.ContextMenu.MouseFlags">MouseFlags</h4>
  444. <div class="markdown level1 summary">
  445. <a class="xref" href="Terminal.Gui.MouseFlags.html">MouseFlags</a> specifies the mouse action used to activate the context menu by mouse.
  446. </div>
  447. <div class="markdown level1 conceptual"></div>
  448. <h5 class="decalaration">Declaration</h5>
  449. <div class="codewrapper">
  450. <pre><code class="lang-csharp hljs">public MouseFlags MouseFlags { get; set; }</code></pre>
  451. </div>
  452. <h5 class="propertyValue">Property Value</h5>
  453. <table class="table table-bordered table-striped table-condensed">
  454. <thead>
  455. <tr>
  456. <th>Type</th>
  457. <th>Description</th>
  458. </tr>
  459. </thead>
  460. <tbody>
  461. <tr>
  462. <td><a class="xref" href="Terminal.Gui.MouseFlags.html">MouseFlags</a></td>
  463. <td></td>
  464. </tr>
  465. </tbody>
  466. </table>
  467. <span class="small pull-right mobile-hide">
  468. <span class="divider">|</span>
  469. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu_Position.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.Position%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>
  470. </span>
  471. <span class="small pull-right mobile-hide">
  472. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L182">View Source</a>
  473. </span>
  474. <a id="Terminal_Gui_ContextMenu_Position_" data-uid="Terminal.Gui.ContextMenu.Position*"></a>
  475. <h4 id="Terminal_Gui_ContextMenu_Position" data-uid="Terminal.Gui.ContextMenu.Position">Position</h4>
  476. <div class="markdown level1 summary">
  477. Gets or sets the menu position.
  478. </div>
  479. <div class="markdown level1 conceptual"></div>
  480. <h5 class="decalaration">Declaration</h5>
  481. <div class="codewrapper">
  482. <pre><code class="lang-csharp hljs">public Point Position { get; set; }</code></pre>
  483. </div>
  484. <h5 class="propertyValue">Property Value</h5>
  485. <table class="table table-bordered table-striped table-condensed">
  486. <thead>
  487. <tr>
  488. <th>Type</th>
  489. <th>Description</th>
  490. </tr>
  491. </thead>
  492. <tbody>
  493. <tr>
  494. <td><a class="xref" href="Terminal.Gui.Point.html">Point</a></td>
  495. <td></td>
  496. </tr>
  497. </tbody>
  498. </table>
  499. <span class="small pull-right mobile-hide">
  500. <span class="divider">|</span>
  501. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu_UseSubMenusSingleFrame.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.UseSubMenusSingleFrame%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>
  502. </span>
  503. <span class="small pull-right mobile-hide">
  504. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L241">View Source</a>
  505. </span>
  506. <a id="Terminal_Gui_ContextMenu_UseSubMenusSingleFrame_" data-uid="Terminal.Gui.ContextMenu.UseSubMenusSingleFrame*"></a>
  507. <h4 id="Terminal_Gui_ContextMenu_UseSubMenusSingleFrame" data-uid="Terminal.Gui.ContextMenu.UseSubMenusSingleFrame">UseSubMenusSingleFrame</h4>
  508. <div class="markdown level1 summary">
  509. Gets or sets if sub-menus will be displayed using a &quot;single frame&quot; menu style. If <span class="xref">true</span>, the ContextMenu
  510. and any sub-menus that would normally cascade will be displayed within a single frame. If <span class="xref">false</span> (the default),
  511. sub-menus will cascade using separate frames for each level of the menu hierarchy.
  512. </div>
  513. <div class="markdown level1 conceptual"></div>
  514. <h5 class="decalaration">Declaration</h5>
  515. <div class="codewrapper">
  516. <pre><code class="lang-csharp hljs">public bool UseSubMenusSingleFrame { get; set; }</code></pre>
  517. </div>
  518. <h5 class="propertyValue">Property Value</h5>
  519. <table class="table table-bordered table-striped table-condensed">
  520. <thead>
  521. <tr>
  522. <th>Type</th>
  523. <th>Description</th>
  524. </tr>
  525. </thead>
  526. <tbody>
  527. <tr>
  528. <td><span class="xref">System.Boolean</span></td>
  529. <td></td>
  530. </tr>
  531. </tbody>
  532. </table>
  533. <h3 id="methods">Methods
  534. </h3>
  535. <span class="small pull-right mobile-hide">
  536. <span class="divider">|</span>
  537. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu_Dispose.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.Dispose%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>
  538. </span>
  539. <span class="small pull-right mobile-hide">
  540. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L72">View Source</a>
  541. </span>
  542. <a id="Terminal_Gui_ContextMenu_Dispose_" data-uid="Terminal.Gui.ContextMenu.Dispose*"></a>
  543. <h4 id="Terminal_Gui_ContextMenu_Dispose" data-uid="Terminal.Gui.ContextMenu.Dispose">Dispose()</h4>
  544. <div class="markdown level1 summary">
  545. Disposes the context menu object.
  546. </div>
  547. <div class="markdown level1 conceptual"></div>
  548. <h5 class="decalaration">Declaration</h5>
  549. <div class="codewrapper">
  550. <pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
  551. </div>
  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_ContextMenu_Hide.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.Hide%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/ContextMenu.cs/#L163">View Source</a>
  558. </span>
  559. <a id="Terminal_Gui_ContextMenu_Hide_" data-uid="Terminal.Gui.ContextMenu.Hide*"></a>
  560. <h4 id="Terminal_Gui_ContextMenu_Hide" data-uid="Terminal.Gui.ContextMenu.Hide">Hide()</h4>
  561. <div class="markdown level1 summary">
  562. Hides (closes) the ContextMenu.
  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 void Hide()</code></pre>
  568. </div>
  569. <span class="small pull-right mobile-hide">
  570. <span class="divider">|</span>
  571. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu_Show.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.Show%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>
  572. </span>
  573. <span class="small pull-right mobile-hide">
  574. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L89">View Source</a>
  575. </span>
  576. <a id="Terminal_Gui_ContextMenu_Show_" data-uid="Terminal.Gui.ContextMenu.Show*"></a>
  577. <h4 id="Terminal_Gui_ContextMenu_Show" data-uid="Terminal.Gui.ContextMenu.Show">Show()</h4>
  578. <div class="markdown level1 summary">
  579. Shows (opens) the ContextMenu, displaying the <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>s it contains.
  580. </div>
  581. <div class="markdown level1 conceptual"></div>
  582. <h5 class="decalaration">Declaration</h5>
  583. <div class="codewrapper">
  584. <pre><code class="lang-csharp hljs">public void Show()</code></pre>
  585. </div>
  586. <h3 id="events">Events
  587. </h3>
  588. <span class="small pull-right mobile-hide">
  589. <span class="divider">|</span>
  590. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu_KeyChanged.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.KeyChanged%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>
  591. </span>
  592. <span class="small pull-right mobile-hide">
  593. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L172">View Source</a>
  594. </span>
  595. <h4 id="Terminal_Gui_ContextMenu_KeyChanged" data-uid="Terminal.Gui.ContextMenu.KeyChanged">KeyChanged</h4>
  596. <div class="markdown level1 summary">
  597. Event invoked when the <a class="xref" href="Terminal.Gui.ContextMenu.html#Terminal_Gui_ContextMenu_Key">Key</a> is changed.
  598. </div>
  599. <div class="markdown level1 conceptual"></div>
  600. <h5 class="decalaration">Declaration</h5>
  601. <div class="codewrapper">
  602. <pre><code class="lang-csharp hljs">public event Action&lt;Key&gt; KeyChanged</code></pre>
  603. </div>
  604. <h5 class="eventType">Event Type</h5>
  605. <table class="table table-bordered table-striped table-condensed">
  606. <thead>
  607. <tr>
  608. <th>Type</th>
  609. <th>Description</th>
  610. </tr>
  611. </thead>
  612. <tbody>
  613. <tr>
  614. <td><span class="xref">System.Action</span>&lt;<a class="xref" href="Terminal.Gui.Key.html">Key</a>&gt;</td>
  615. <td></td>
  616. </tr>
  617. </tbody>
  618. </table>
  619. <span class="small pull-right mobile-hide">
  620. <span class="divider">|</span>
  621. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu_MouseFlagsChanged.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu.MouseFlagsChanged%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>
  622. </span>
  623. <span class="small pull-right mobile-hide">
  624. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L177">View Source</a>
  625. </span>
  626. <h4 id="Terminal_Gui_ContextMenu_MouseFlagsChanged" data-uid="Terminal.Gui.ContextMenu.MouseFlagsChanged">MouseFlagsChanged</h4>
  627. <div class="markdown level1 summary">
  628. Event invoked when the <a class="xref" href="Terminal.Gui.ContextMenu.html#Terminal_Gui_ContextMenu_MouseFlags">MouseFlags</a> is changed.
  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 event Action&lt;MouseFlags&gt; MouseFlagsChanged</code></pre>
  634. </div>
  635. <h5 class="eventType">Event Type</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><span class="xref">System.Action</span>&lt;<a class="xref" href="Terminal.Gui.MouseFlags.html">MouseFlags</a>&gt;</td>
  646. <td></td>
  647. </tr>
  648. </tbody>
  649. </table>
  650. <h3 id="implements">Implements</h3>
  651. <div>
  652. <span class="xref">System.IDisposable</span>
  653. </div>
  654. </article>
  655. </div>
  656. <div class="hidden-sm col-md-2" role="complementary">
  657. <div class="sideaffix">
  658. <div class="contribution">
  659. <ul class="nav">
  660. <li>
  661. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ContextMenu.md&amp;value=---%0Auid%3A%20Terminal.Gui.ContextMenu%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>
  662. </li>
  663. <li>
  664. <a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/Terminal.Gui/Views/ContextMenu.cs/#L24" class="contribution-link">View Source</a>
  665. </li>
  666. </ul>
  667. </div>
  668. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  669. <h5>In This Article</h5>
  670. <div></div>
  671. </nav>
  672. </div>
  673. </div>
  674. </div>
  675. </div>
  676. <footer>
  677. <div class="grad-bottom"></div>
  678. <div class="footer">
  679. <div class="container">
  680. <span class="pull-right">
  681. <a href="#top">Back to top</a>
  682. </span>
  683. <span>Generated by <strong>DocFX</strong></span>
  684. </div>
  685. </div>
  686. </footer>
  687. </div>
  688. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  689. <script type="text/javascript" src="../../styles/docfx.js"></script>
  690. <script type="text/javascript" src="../../styles/main.js"></script>
  691. </body>
  692. </html>