# C1.Win.C1Input.C1TextBox.MaxLengthUnit

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_C1Input_C1TextBox_MaxLengthUnit_" data-uid="C1.Win.C1Input.C1TextBox.MaxLengthUnit*">MaxLengthUnit Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_C1Input_C1TextBox_MaxLengthUnit_" data-uid="C1.Win.C1Input.C1TextBox.MaxLengthUnit*"></a>
<h4 id="C1_Win_C1Input_C1TextBox_MaxLengthUnit" data-uid="C1.Win.C1Input.C1TextBox.MaxLengthUnit">MaxLengthUnit</h4>
<div class="markdown level1 summary"><p>Gets or sets whether the maximum number of characters that fit in the control
are handled based on bytes, characters, or text elements.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public LengthUnit MaxLengthUnit { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Property MaxLengthUnit As LengthUnit</code></pre>
</div>
<h5 id="C1_Win_C1Input_C1TextBox_MaxLengthUnit_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Determines the unit for counting for the <a class="xref" href="C1.Win.C1Input.C1TextBox.MaxLength.html#C1_Win_C1Input_C1TextBox_MaxLength">MaxLength</a> property.
The value <b>LengthUnit.Byte</b> means the MaxLength is counted by Byte.
The value <b>LengthUnit.Char</b> means the MaxLength is counted by Char.</p>
</div>
</div>
