# FarPoint.Win.Spread.CellType.DateTimeCellType.GetPreferredSize

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_CellType_DateTimeCellType_GetPreferredSize_" data-uid="FarPoint.Win.Spread.CellType.DateTimeCellType.GetPreferredSize*">GetPreferredSize Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_CellType_DateTimeCellType_GetPreferredSize_" data-uid="FarPoint.Win.Spread.CellType.DateTimeCellType.GetPreferredSize*"></a>
<h4 id="FarPoint_Win_Spread_CellType_DateTimeCellType_GetPreferredSize_System_Drawing_Graphics_System_Drawing_Size_FarPoint_Win_Spread_Appearance_System_Object_System_Single_" data-uid="FarPoint.Win.Spread.CellType.DateTimeCellType.GetPreferredSize(System.Drawing.Graphics,System.Drawing.Size,FarPoint.Win.Spread.Appearance,System.Object,System.Single)">GetPreferredSize(Graphics, Size, Appearance, object, float)</h4>
<div class="markdown level1 summary"><p>Gets the preferred (maximum required) size of the cell for the editor control.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public override Size GetPreferredSize(Graphics g, Size size, Appearance appearance, object value, float zoomFactor)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overrides Function GetPreferredSize(g As Graphics, size As Size, appearance As Appearance, value As Object, zoomFactor As Single) As Size</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="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a></td>
      <td><span class="parametername">g</span></td>
      <td><p>Graphics device interface for painting the cell</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.size">Size</a></td>
      <td><span class="parametername">size</span></td>
      <td><p>Preferred or maximum size needed</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.Appearance.html">Appearance</a></td>
      <td><span class="parametername">appearance</span></td>
      <td><p>Appearance settings of the renderer control</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>Object that contains the name of the renderer control</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">zoomFactor</span></td>
      <td><p>Numeric value for scaling the display of the renderer control</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.drawing.size">Size</a></td>
      <td><p>The preferred size of the cell for the renderer control</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="FarPoint.Win.Spread.CellType.EditBaseCellType.GetPreferredSize.html#FarPoint_Win_Spread_CellType_EditBaseCellType_GetPreferredSize_System_Drawing_Graphics_System_Drawing_Size_FarPoint_Win_Spread_Appearance_System_Object_System_Single_">EditBaseCellType.GetPreferredSize(Graphics, Size, Appearance, object, float)</a></div>
</div>
