Terminal.Gui.ColumnStyle.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  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 ColumnStyle
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class ColumnStyle
  11. ">
  12. <meta name="generator" content="docfx 2.56.7.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. <meta property="docfx:navrel" content="../../toc.html">
  18. <meta property="docfx:tocrel" content="toc.html">
  19. <meta property="docfx:rel" content="../../">
  20. </head>
  21. <body data-spy="scroll" data-target="#affix" data-offset="120">
  22. <div id="wrapper">
  23. <header>
  24. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  25. <div class="container">
  26. <div class="navbar-header">
  27. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a class="navbar-brand" href="../../index.html">
  34. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  35. </a>
  36. </div>
  37. <div class="collapse navbar-collapse" id="navbar">
  38. <form class="navbar-form navbar-right" role="search" id="search">
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </nav>
  46. <div class="subnav navbar navbar-default">
  47. <div class="container hide-when-search" id="breadcrumb">
  48. <ul class="breadcrumb">
  49. <li></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </header>
  54. <div class="container body-content">
  55. <div id="search-results">
  56. <div class="search-list">Search Results for <span></span></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  61. </div>
  62. </div>
  63. <div role="main" class="container body-content hide-when-search">
  64. <div class="sidenav hide-when-search">
  65. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  66. <div class="sidetoggle collapse" id="sidetoggle">
  67. <div id="sidetoc"></div>
  68. </div>
  69. </div>
  70. <div class="article row grid-right">
  71. <div class="col-md-10">
  72. <article class="content wrap" id="_content" data-uid="Terminal.Gui.ColumnStyle">
  73. <h1 id="Terminal_Gui_ColumnStyle" data-uid="Terminal.Gui.ColumnStyle" class="text-break">Class ColumnStyle
  74. </h1>
  75. <div class="markdown level0 summary">
  76. Describes how to render a given column in a <a class="xref" href="Terminal.Gui.TableView.html">TableView</a> including <a class="xref" href="Terminal.Gui.ColumnStyle.html#Terminal_Gui_ColumnStyle_Alignment">Alignment</a> and textual representation of cells (e.g. date formats)
  77. </div>
  78. <div class="markdown level0 conceptual"></div>
  79. <div class="inheritance">
  80. <h5>Inheritance</h5>
  81. <div class="level0"><span class="xref">System.Object</span></div>
  82. <div class="level1"><span class="xref">ColumnStyle</span></div>
  83. </div>
  84. <div class="inheritedMembers">
  85. <h5>Inherited Members</h5>
  86. <div>
  87. <span class="xref">System.Object.Equals(System.Object)</span>
  88. </div>
  89. <div>
  90. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  91. </div>
  92. <div>
  93. <span class="xref">System.Object.GetHashCode()</span>
  94. </div>
  95. <div>
  96. <span class="xref">System.Object.GetType()</span>
  97. </div>
  98. <div>
  99. <span class="xref">System.Object.MemberwiseClone()</span>
  100. </div>
  101. <div>
  102. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  103. </div>
  104. <div>
  105. <span class="xref">System.Object.ToString()</span>
  106. </div>
  107. </div>
  108. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  109. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  110. <h5 id="Terminal_Gui_ColumnStyle_syntax">Syntax</h5>
  111. <div class="codewrapper">
  112. <pre><code class="lang-csharp hljs">public class ColumnStyle</code></pre>
  113. </div>
  114. <h3 id="fields">Fields
  115. </h3>
  116. <h4 id="Terminal_Gui_ColumnStyle_AlignmentGetter" data-uid="Terminal.Gui.ColumnStyle.AlignmentGetter">AlignmentGetter</h4>
  117. <div class="markdown level1 summary">
  118. Defines a delegate for returning custom alignment per cell based on cell values. When specified this will override <a class="xref" href="Terminal.Gui.ColumnStyle.html#Terminal_Gui_ColumnStyle_Alignment">Alignment</a>
  119. </div>
  120. <div class="markdown level1 conceptual"></div>
  121. <h5 class="decalaration">Declaration</h5>
  122. <div class="codewrapper">
  123. <pre><code class="lang-csharp hljs">public Func&lt;object, TextAlignment&gt; AlignmentGetter</code></pre>
  124. </div>
  125. <h5 class="fieldValue">Field Value</h5>
  126. <table class="table table-bordered table-striped table-condensed">
  127. <thead>
  128. <tr>
  129. <th>Type</th>
  130. <th>Description</th>
  131. </tr>
  132. </thead>
  133. <tbody>
  134. <tr>
  135. <td><span class="xref">System.Func</span>&lt;<span class="xref">System.Object</span>, <a class="xref" href="Terminal.Gui.TextAlignment.html">TextAlignment</a>&gt;</td>
  136. <td></td>
  137. </tr>
  138. </tbody>
  139. </table>
  140. <h4 id="Terminal_Gui_ColumnStyle_RepresentationGetter" data-uid="Terminal.Gui.ColumnStyle.RepresentationGetter">RepresentationGetter</h4>
  141. <div class="markdown level1 summary">
  142. Defines a delegate for returning custom representations of cell values. If not set then <span class="xref">System.Object.ToString()</span> is used. Return values from your delegate may be truncated e.g. based on <a class="xref" href="Terminal.Gui.ColumnStyle.html#Terminal_Gui_ColumnStyle_MaxWidth">MaxWidth</a>
  143. </div>
  144. <div class="markdown level1 conceptual"></div>
  145. <h5 class="decalaration">Declaration</h5>
  146. <div class="codewrapper">
  147. <pre><code class="lang-csharp hljs">public Func&lt;object, string&gt; RepresentationGetter</code></pre>
  148. </div>
  149. <h5 class="fieldValue">Field Value</h5>
  150. <table class="table table-bordered table-striped table-condensed">
  151. <thead>
  152. <tr>
  153. <th>Type</th>
  154. <th>Description</th>
  155. </tr>
  156. </thead>
  157. <tbody>
  158. <tr>
  159. <td><span class="xref">System.Func</span>&lt;<span class="xref">System.Object</span>, <span class="xref">System.String</span>&gt;</td>
  160. <td></td>
  161. </tr>
  162. </tbody>
  163. </table>
  164. <h3 id="properties">Properties
  165. </h3>
  166. <a id="Terminal_Gui_ColumnStyle_Alignment_" data-uid="Terminal.Gui.ColumnStyle.Alignment*"></a>
  167. <h4 id="Terminal_Gui_ColumnStyle_Alignment" data-uid="Terminal.Gui.ColumnStyle.Alignment">Alignment</h4>
  168. <div class="markdown level1 summary">
  169. Defines the default alignment for all values rendered in this column. For custom alignment based on cell contents use <a class="xref" href="Terminal.Gui.ColumnStyle.html#Terminal_Gui_ColumnStyle_AlignmentGetter">AlignmentGetter</a>.
  170. </div>
  171. <div class="markdown level1 conceptual"></div>
  172. <h5 class="decalaration">Declaration</h5>
  173. <div class="codewrapper">
  174. <pre><code class="lang-csharp hljs">public TextAlignment Alignment { get; set; }</code></pre>
  175. </div>
  176. <h5 class="propertyValue">Property Value</h5>
  177. <table class="table table-bordered table-striped table-condensed">
  178. <thead>
  179. <tr>
  180. <th>Type</th>
  181. <th>Description</th>
  182. </tr>
  183. </thead>
  184. <tbody>
  185. <tr>
  186. <td><a class="xref" href="Terminal.Gui.TextAlignment.html">TextAlignment</a></td>
  187. <td></td>
  188. </tr>
  189. </tbody>
  190. </table>
  191. <a id="Terminal_Gui_ColumnStyle_Format_" data-uid="Terminal.Gui.ColumnStyle.Format*"></a>
  192. <h4 id="Terminal_Gui_ColumnStyle_Format" data-uid="Terminal.Gui.ColumnStyle.Format">Format</h4>
  193. <div class="markdown level1 summary">
  194. Defines the format for values e.g. &quot;yyyy-MM-dd&quot; for dates
  195. </div>
  196. <div class="markdown level1 conceptual"></div>
  197. <h5 class="decalaration">Declaration</h5>
  198. <div class="codewrapper">
  199. <pre><code class="lang-csharp hljs">public string Format { get; set; }</code></pre>
  200. </div>
  201. <h5 class="propertyValue">Property Value</h5>
  202. <table class="table table-bordered table-striped table-condensed">
  203. <thead>
  204. <tr>
  205. <th>Type</th>
  206. <th>Description</th>
  207. </tr>
  208. </thead>
  209. <tbody>
  210. <tr>
  211. <td><span class="xref">System.String</span></td>
  212. <td></td>
  213. </tr>
  214. </tbody>
  215. </table>
  216. <a id="Terminal_Gui_ColumnStyle_MaxWidth_" data-uid="Terminal.Gui.ColumnStyle.MaxWidth*"></a>
  217. <h4 id="Terminal_Gui_ColumnStyle_MaxWidth" data-uid="Terminal.Gui.ColumnStyle.MaxWidth">MaxWidth</h4>
  218. <div class="markdown level1 summary">
  219. Set the maximum width of the column in characters. This value will be ignored if more than the tables <a class="xref" href="Terminal.Gui.TableView.html#Terminal_Gui_TableView_MaxCellWidth">MaxCellWidth</a>. Defaults to <a class="xref" href="Terminal.Gui.TableView.html#Terminal_Gui_TableView_DefaultMaxCellWidth">DefaultMaxCellWidth</a>
  220. </div>
  221. <div class="markdown level1 conceptual"></div>
  222. <h5 class="decalaration">Declaration</h5>
  223. <div class="codewrapper">
  224. <pre><code class="lang-csharp hljs">public int MaxWidth { get; set; }</code></pre>
  225. </div>
  226. <h5 class="propertyValue">Property Value</h5>
  227. <table class="table table-bordered table-striped table-condensed">
  228. <thead>
  229. <tr>
  230. <th>Type</th>
  231. <th>Description</th>
  232. </tr>
  233. </thead>
  234. <tbody>
  235. <tr>
  236. <td><span class="xref">System.Int32</span></td>
  237. <td></td>
  238. </tr>
  239. </tbody>
  240. </table>
  241. <a id="Terminal_Gui_ColumnStyle_MinWidth_" data-uid="Terminal.Gui.ColumnStyle.MinWidth*"></a>
  242. <h4 id="Terminal_Gui_ColumnStyle_MinWidth" data-uid="Terminal.Gui.ColumnStyle.MinWidth">MinWidth</h4>
  243. <div class="markdown level1 summary">
  244. Set the minimum width of the column in characters. This value will be ignored if more than the tables <a class="xref" href="Terminal.Gui.TableView.html#Terminal_Gui_TableView_MaxCellWidth">MaxCellWidth</a> or the <a class="xref" href="Terminal.Gui.ColumnStyle.html#Terminal_Gui_ColumnStyle_MaxWidth">MaxWidth</a>
  245. </div>
  246. <div class="markdown level1 conceptual"></div>
  247. <h5 class="decalaration">Declaration</h5>
  248. <div class="codewrapper">
  249. <pre><code class="lang-csharp hljs">public int MinWidth { get; set; }</code></pre>
  250. </div>
  251. <h5 class="propertyValue">Property Value</h5>
  252. <table class="table table-bordered table-striped table-condensed">
  253. <thead>
  254. <tr>
  255. <th>Type</th>
  256. <th>Description</th>
  257. </tr>
  258. </thead>
  259. <tbody>
  260. <tr>
  261. <td><span class="xref">System.Int32</span></td>
  262. <td></td>
  263. </tr>
  264. </tbody>
  265. </table>
  266. <h3 id="methods">Methods
  267. </h3>
  268. <a id="Terminal_Gui_ColumnStyle_GetAlignment_" data-uid="Terminal.Gui.ColumnStyle.GetAlignment*"></a>
  269. <h4 id="Terminal_Gui_ColumnStyle_GetAlignment_System_Object_" data-uid="Terminal.Gui.ColumnStyle.GetAlignment(System.Object)">GetAlignment(Object)</h4>
  270. <div class="markdown level1 summary">
  271. Returns the alignment for the cell based on <code data-dev-comment-type="paramref" class="paramref">cellValue</code> and <a class="xref" href="Terminal.Gui.ColumnStyle.html#Terminal_Gui_ColumnStyle_AlignmentGetter">AlignmentGetter</a>/<a class="xref" href="Terminal.Gui.ColumnStyle.html#Terminal_Gui_ColumnStyle_Alignment">Alignment</a>
  272. </div>
  273. <div class="markdown level1 conceptual"></div>
  274. <h5 class="decalaration">Declaration</h5>
  275. <div class="codewrapper">
  276. <pre><code class="lang-csharp hljs">public TextAlignment GetAlignment(object cellValue)</code></pre>
  277. </div>
  278. <h5 class="parameters">Parameters</h5>
  279. <table class="table table-bordered table-striped table-condensed">
  280. <thead>
  281. <tr>
  282. <th>Type</th>
  283. <th>Name</th>
  284. <th>Description</th>
  285. </tr>
  286. </thead>
  287. <tbody>
  288. <tr>
  289. <td><span class="xref">System.Object</span></td>
  290. <td><span class="parametername">cellValue</span></td>
  291. <td></td>
  292. </tr>
  293. </tbody>
  294. </table>
  295. <h5 class="returns">Returns</h5>
  296. <table class="table table-bordered table-striped table-condensed">
  297. <thead>
  298. <tr>
  299. <th>Type</th>
  300. <th>Description</th>
  301. </tr>
  302. </thead>
  303. <tbody>
  304. <tr>
  305. <td><a class="xref" href="Terminal.Gui.TextAlignment.html">TextAlignment</a></td>
  306. <td></td>
  307. </tr>
  308. </tbody>
  309. </table>
  310. <a id="Terminal_Gui_ColumnStyle_GetRepresentation_" data-uid="Terminal.Gui.ColumnStyle.GetRepresentation*"></a>
  311. <h4 id="Terminal_Gui_ColumnStyle_GetRepresentation_System_Object_" data-uid="Terminal.Gui.ColumnStyle.GetRepresentation(System.Object)">GetRepresentation(Object)</h4>
  312. <div class="markdown level1 summary">
  313. Returns the full string to render (which may be truncated if too long) that the current style says best represents the given <code data-dev-comment-type="paramref" class="paramref">value</code>
  314. </div>
  315. <div class="markdown level1 conceptual"></div>
  316. <h5 class="decalaration">Declaration</h5>
  317. <div class="codewrapper">
  318. <pre><code class="lang-csharp hljs">public string GetRepresentation(object value)</code></pre>
  319. </div>
  320. <h5 class="parameters">Parameters</h5>
  321. <table class="table table-bordered table-striped table-condensed">
  322. <thead>
  323. <tr>
  324. <th>Type</th>
  325. <th>Name</th>
  326. <th>Description</th>
  327. </tr>
  328. </thead>
  329. <tbody>
  330. <tr>
  331. <td><span class="xref">System.Object</span></td>
  332. <td><span class="parametername">value</span></td>
  333. <td></td>
  334. </tr>
  335. </tbody>
  336. </table>
  337. <h5 class="returns">Returns</h5>
  338. <table class="table table-bordered table-striped table-condensed">
  339. <thead>
  340. <tr>
  341. <th>Type</th>
  342. <th>Description</th>
  343. </tr>
  344. </thead>
  345. <tbody>
  346. <tr>
  347. <td><span class="xref">System.String</span></td>
  348. <td></td>
  349. </tr>
  350. </tbody>
  351. </table>
  352. </article>
  353. </div>
  354. <div class="hidden-sm col-md-2" role="complementary">
  355. <div class="sideaffix">
  356. <div class="contribution">
  357. <ul class="nav">
  358. </ul>
  359. </div>
  360. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  361. <h5>In This Article</h5>
  362. <div></div>
  363. </nav>
  364. </div>
  365. </div>
  366. </div>
  367. </div>
  368. <footer>
  369. <div class="grad-bottom"></div>
  370. <div class="footer">
  371. <div class="container">
  372. <span class="pull-right">
  373. <a href="#top">Back to top</a>
  374. </span>
  375. <span>Generated by <strong>DocFX</strong></span>
  376. </div>
  377. </div>
  378. </footer>
  379. </div>
  380. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  381. <script type="text/javascript" src="../../styles/docfx.js"></script>
  382. <script type="text/javascript" src="../../styles/main.js"></script>
  383. </body>
  384. </html>