# C1.Framework.TextElement.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Framework_TextElement__ctor_" data-uid="C1.Framework.TextElement.#ctor*">TextElement Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Framework_TextElement__ctor_" data-uid="C1.Framework.TextElement.#ctor*"></a>
<h4 id="C1_Framework_TextElement__ctor_C1_Framework_Style_System_String_" data-uid="C1.Framework.TextElement.#ctor(C1.Framework.Style,System.String)">TextElement(Style, string)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of a <a class="xref" href="C1.Framework.TextElement.html">TextElement</a> with a given style and contents.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TextElement(Style style, string text)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(style As Style, text As String)</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="C1.Framework.Style.html">Style</a></td>
      <td><span class="parametername">style</span></td>
      <td><p><a class="xref" href="C1.Framework.Style.html">Style</a> used to measure and render the <a class="xref" href="C1.Framework.TextElement.html">TextElement</a>,</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>String displayed in the <a class="xref" href="C1.Framework.TextElement.html">TextElement</a>,</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Framework_TextElement__ctor_" data-uid="C1.Framework.TextElement.#ctor*"></a>
<h4 id="C1_Framework_TextElement__ctor_C1_Framework_Style_" data-uid="C1.Framework.TextElement.#ctor(C1.Framework.Style)">TextElement(Style)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of a <a class="xref" href="C1.Framework.TextElement.html">TextElement</a> with a given style.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TextElement(Style style)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(style As Style)</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="C1.Framework.Style.html">Style</a></td>
      <td><span class="parametername">style</span></td>
      <td><p><a class="xref" href="C1.Framework.Style.html">Style</a> used to measure and render the <a class="xref" href="C1.Framework.TextElement.html">TextElement</a>,</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Framework_TextElement__ctor_" data-uid="C1.Framework.TextElement.#ctor*"></a>
<h4 id="C1_Framework_TextElement__ctor_System_String_" data-uid="C1.Framework.TextElement.#ctor(System.String)">TextElement(string)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of a <a class="xref" href="C1.Framework.TextElement.html">TextElement</a> with a given text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TextElement(string text)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(text As String)</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.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>String displayed in the <a class="xref" href="C1.Framework.TextElement.html">TextElement</a>,</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Framework_TextElement__ctor_" data-uid="C1.Framework.TextElement.#ctor*"></a>
<h4 id="C1_Framework_TextElement__ctor" data-uid="C1.Framework.TextElement.#ctor">TextElement()</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of an empty <a class="xref" href="C1.Framework.TextElement.html">TextElement</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TextElement()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New()</code></pre>
</div>
</div>
