# C1.C1Preview.RenderVerticalText

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_C1Preview_RenderVerticalText" data-uid="C1.C1Preview.RenderVerticalText" class="text-break">RenderVerticalText Class
</h1>
  <div class="markdown level0 summary"><p>Represents a run of vertical text in a <a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a>.</p>
<p>
Designed primarily for rendering of Asian (e.g. Japanese) text in the traditional manner,
vertically from right to left.
</p>
<p>
Text is drawn using a single style (see <a class="xref" href="C1.C1Preview.RenderVerticalParagraph.html">RenderVerticalParagraph</a> for multi-style text).
</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a></div>
    <div class="level2"><a class="xref" href="C1.C1Preview.RenderTextBase.html">RenderTextBase</a></div>
    <div class="level3"><a class="xref" href="C1.C1Preview.RenderText.html">RenderText</a></div>
    <div class="level4"><span class="xref">RenderVerticalText</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="C1.C1Preview.IStyleOwner.html">IStyleOwner</a></div>
    <div><a class="xref" href="C1.C1Preview.IDocumentLocation.html">IDocumentLocation</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.C1Preview.html">C1.C1Preview</a></h6>
  <h6><strong>Assembly</strong>: C1.PrintDocument.4.8.dll</h6>
  <h5 id="C1_C1Preview_RenderVerticalText_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class RenderVerticalText : RenderText, IStyleOwner, IDocumentLocation</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class RenderVerticalText
    Inherits RenderText
    Implements IStyleOwner, IDocumentLocation</code></pre>
  </div>
  <h5 id="C1_C1Preview_RenderVerticalText_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>
The default height and width of <a class="xref" href="C1.C1Preview.RenderVerticalText.html">RenderVerticalText</a> is <code>auto</code>.
In particular, that means that text without line breaks will by default stretch
downwards indefinitely. To make text wrap at the bottom, the height of
the <a class="xref" href="C1.C1Preview.RenderVerticalText.html">RenderVerticalText</a> object must be explicitly set.
</p>
<p>
Note that while the main use of this class is to output text in Asian languages, you can also
print English text in this manner. To do so, add hex code 0xFEE0 to each English letter.
</p>
</div>
  <h5 id="C1_C1Preview_RenderVerticalText_examples"><strong>Examples</strong></h5>
  <p>The code below prints &quot;CASINO ROYAL&quot; and digits &quot;12345&quot; vertically:</p>
<pre><code class="lang-csharp">private static string ToVertical(string s)
{
    StringBuilder sb = new StringBuilder(s.Length);
    for (int i = 0; i &lt; s.Length; i++)
        if (s[i] == ' ')
            sb.Append(s[i]);
        else
            sb.Append((char)((int)s[i] + (0xFF10 - (int)'0')));
    return sb.ToString();
}

private C1PrintDocument CreateDocument()
{
    C1PrintDocument doc = new C1PrintDocument();
    doc.FontHandling = FontHandling.EmbedActualFonts;

    RenderVerticalText rt;

    rt = new RenderVerticalText();
    rt.Style.Borders.All = LineDef.Default;
    rt.Style.Font = new Font("Arial", 18);
    rt.Text = ToVertical("CASINO ROYAL");
    doc.Body.Children.Add(rt);

    rt = new RenderVerticalText();
    rt.Style.Borders.All = LineDef.Default;
    rt.Style.Font = new Font("Arial", 18);
    rt.Text = ToVertical("Digits: (12345)");
    doc.Body.Children.Add(rt);

    return doc;
}</code></pre>

  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_C1Preview_RenderVerticalText__ctor" data-uid="C1.C1Preview.RenderVerticalText.#ctor">
          <a class="xref" href="C1.C1Preview.RenderVerticalText.-ctor.html#C1_C1Preview_RenderVerticalText__ctor">RenderVerticalText()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.RenderVerticalText.html">RenderVerticalText</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_C1Preview_RenderVerticalText_GetDefaultHeight" data-uid="C1.C1Preview.RenderVerticalText.GetDefaultHeight">
          <a class="xref" href="C1.C1Preview.RenderVerticalText.GetDefaultHeight.html#C1_C1Preview_RenderVerticalText_GetDefaultHeight">GetDefaultHeight()</a>
        </td>
        <td class="markdown level1 summary"><p>For internal use only.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderVerticalText_GetDefaultSplitHorzBehavior" data-uid="C1.C1Preview.RenderVerticalText.GetDefaultSplitHorzBehavior">
          <a class="xref" href="C1.C1Preview.RenderVerticalText.GetDefaultSplitHorzBehavior.html#C1_C1Preview_RenderVerticalText_GetDefaultSplitHorzBehavior">GetDefaultSplitHorzBehavior()</a>
        </td>
        <td class="markdown level1 summary"><p>For internal use only.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderVerticalText_GetDefaultSplitVertBehavior" data-uid="C1.C1Preview.RenderVerticalText.GetDefaultSplitVertBehavior">
          <a class="xref" href="C1.C1Preview.RenderVerticalText.GetDefaultSplitVertBehavior.html#C1_C1Preview_RenderVerticalText_GetDefaultSplitVertBehavior">GetDefaultSplitVertBehavior()</a>
        </td>
        <td class="markdown level1 summary"><p>For internal use only.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderVerticalText_GetDefaultWidth" data-uid="C1.C1Preview.RenderVerticalText.GetDefaultWidth">
          <a class="xref" href="C1.C1Preview.RenderVerticalText.GetDefaultWidth.html#C1_C1Preview_RenderVerticalText_GetDefaultWidth">GetDefaultWidth()</a>
        </td>
        <td class="markdown level1 summary"><p>For internal use only.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="seealso">See Also</h3>
  <div class="seealso">
      <div><a class="xref" href="C1.C1Preview.RenderVerticalParagraph.html">RenderVerticalParagraph</a></div>
  </div>

</div>
