# GrapeCity.Wpf.SpreadSheet.CellType.UniversalCellType.GetPreferredHeight

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Wpf_SpreadSheet_CellType_UniversalCellType_GetPreferredHeight_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.UniversalCellType.GetPreferredHeight*">GetPreferredHeight Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Wpf_SpreadSheet_CellType_UniversalCellType_GetPreferredHeight_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.UniversalCellType.GetPreferredHeight*"></a>
<h4 id="GrapeCity_Wpf_SpreadSheet_CellType_UniversalCellType_GetPreferredHeight_GrapeCity_Wpf_SpreadSheet_PaintingContext_System_Object_GrapeCity_Spreadsheet_CfExecutedResult__System_Double_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.UniversalCellType.GetPreferredHeight(GrapeCity.Wpf.SpreadSheet.PaintingContext,System.Object,GrapeCity.Spreadsheet.CfExecutedResult@,System.Double)">GetPreferredHeight(PaintingContext, object, ref CfExecutedResult, double)</h4>
<div class="markdown level1 summary"><p>Gets the preferred cell height to display cell content fully.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected override sealed int GetPreferredHeight(PaintingContext paintingContext, object cellValue, ref CfExecutedResult cellFormat, double width)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected NotOverridable Overrides Function GetPreferredHeight(paintingContext As PaintingContext, cellValue As Object, ByRef cellFormat As CfExecutedResult, width As Double) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Wpf.SpreadSheet.PaintingContext.html">PaintingContext</a></td>
      <td><span class="parametername">paintingContext</span></td>
      <td><p>The painting context.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">cellValue</span></td>
      <td><p>The cell value.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.CfExecutedResult.html">CfExecutedResult</a></td>
      <td><span class="parametername">cellFormat</span></td>
      <td><p>The format settings of cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The current cell width.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The preferred cell height that allow displaying cell content fully.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="GrapeCity.Wpf.SpreadSheet.PaintingContext.html">CellTypeBase.GetPreferredHeight(PaintingContext, object, ref CfExecutedResult, double)</a></div>
</div>
