# C1.Framework.Drawing.Gdi.DeviceContexts.TextFormat

## Content

<div class="doc-site-dotnet-api-container">




  <h1 id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat" data-uid="C1.Framework.Drawing.Gdi.DeviceContexts.TextFormat" class="text-break">TextFormat Enum
</h1>
  <div class="markdown level0 summary"><p>Specifies the method of formatting the text.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Framework.Drawing.Gdi.DeviceContexts.html">C1.Framework.Drawing.Gdi.DeviceContexts</a></h6>
  <h6><strong>Assembly</strong>: C1.Win.C1Input.4.8.dll</h6>
  <h5 id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[Flags]
public enum TextFormat</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;Flags&gt;
Public Enum TextFormat</code></pre>
  </div>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    <thead>
    </thead></thead><tbody>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_Bottom">Bottom</td>
        <td><p>Justifies the text to the bottom of the rectangle. This value is used only with the SingleLine value.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_Default">Default</td>
        <td><p>The default text format is &quot;Top|Left&quot;.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_EditControl">EditControl</td>
        <td><p>Duplicates the text-displaying characteristics of a multiline edit control. Specifically, the average
character width is calculated in the same manner as for an edit control, and the function does not
display a partially visible last line.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_EndEllipsis">EndEllipsis</td>
        <td><p>For displayed text, if the end of a string does not fit in the rectangle, it is truncated and
ellipses are added. If a word that is not at the end of the string goes beyond the limits of
the rectangle, it is truncated without ellipses.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_ExpandTabs">ExpandTabs</td>
        <td><p>Expands tab characters. The default number of characters per tab is eight.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_ExternalLeading">ExternalLeading</td>
        <td><p>Includes the font external leading in line height. Normally, external leading is not included in the
height of a line of text.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_HidePrefix">HidePrefix</td>
        <td><p>Ignores the ampersand (&amp;) prefix character in the text. The letter that follows will not be underlined,
but other mnemonic-prefix characters are still processed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_HorizontalCenter">HorizontalCenter</td>
        <td><p>Centers text horizontally in the rectangle.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_Left">Left</td>
        <td><p>Aligns text to the left.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_NoClip">NoClip</td>
        <td><p>Draws without clipping.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_NoFullWidthCharacterBreak">NoFullWidthCharacterBreak</td>
        <td><p>Prevents a line break at a DBCS (double-wide character string), so that the line breaking rule is equivalent
to SBCS strings.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_NoPrefix">NoPrefix</td>
        <td><p>Turns off processing of prefix characters.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_PathEllipsis">PathEllipsis</td>
        <td><p>For displayed text, replaces characters in the middle of the string with ellipses so that the result
fits in the specified rectangle. If the string contains backslash () characters, PathEllipsis
preserves as much as possible of the text after the last backslash.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_PrefixOnly">PrefixOnly</td>
        <td><p>Draws only an underline at the position of the character following the ampersand (&amp;) prefix character.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_Right">Right</td>
        <td><p>Aligns text to the right.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_RightToLeft">RightToLeft</td>
        <td><p>Layout in right-to-left reading order for bi-directional text when the font selected into the device context
is a Hebrew or Arabic font. The default reading order for all text is left-to-right.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_SingleLine">SingleLine</td>
        <td><p>Displays text on a single line only. Carriage returns and line feeds do not break the line.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_Top">Top</td>
        <td><p>Justifies the text to the top of the rectangle.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_VerticalCenter">VerticalCenter</td>
        <td><p>Centers text vertically. This value is used only with the SingleLine value.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_WordBreak">WordBreak</td>
        <td><p>Breaks words. Lines are automatically broken between words if a word would extend past the edge of the
pecified rectangle. A carriage return-line feed sequence also breaks the line.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_Drawing_Gdi_DeviceContexts_TextFormat_WordEllipsis">WordEllipsis</td>
        <td><p>Truncates any word that does not fit in the rectangle and adds ellipses.</p>
</td>
      </tr>
    </tbody>
  </table>
</div>
