# C1.C1Preview.RenderInputText.GetAutoSize

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_RenderInputText_GetAutoSize_" data-uid="C1.C1Preview.RenderInputText.GetAutoSize*">GetAutoSize Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_RenderInputText_GetAutoSize_" data-uid="C1.C1Preview.RenderInputText.GetAutoSize*"></a>
<h4 id="C1_C1Preview_RenderInputText_GetAutoSize_C1_C1Preview_Scripting_IScriptContext_System_Int32__System_Int32__" data-uid="C1.C1Preview.RenderInputText.GetAutoSize(C1.C1Preview.Scripting.IScriptContext,System.Int32@,System.Int32@)">GetAutoSize(IScriptContext, ref int, ref int)</h4>
<div class="markdown level1 summary"><p>Returns the preffered size of the control in pixels.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public override void GetAutoSize(IScriptContext context, ref int width, ref int height)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overrides Sub GetAutoSize(context As IScriptContext, ByRef width As Integer, ByRef height 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><span class="xref">IScriptContext</span></td>
      <td><span class="parametername">context</span></td>
      <td><p>Context that should be used to get calculated style properties.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>OUT: Width of the control.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>OUT: Height of the control.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="C1.C1Preview.RenderInputBase.GetAutoSize.html#C1_C1Preview_RenderInputBase_GetAutoSize_C1_C1Preview_Scripting_IScriptContext_System_Int32__System_Int32__">RenderInputBase.GetAutoSize(IScriptContext, ref int, ref int)</a></div>
</div>
