# C1.WPF.Word.C1WordDocument.DrawString

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_Word_C1WordDocument_DrawString_" data-uid="C1.WPF.Word.C1WordDocument.DrawString*">DrawString Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_Word_C1WordDocument_DrawString_" data-uid="C1.WPF.Word.C1WordDocument.DrawString*"></a>
<h4 id="C1_WPF_Word_C1WordDocument_DrawString_System_String_System_Windows_Rect_" data-uid="C1.WPF.Word.C1WordDocument.DrawString(System.String,System.Windows.Rect)">DrawString(string, Rect)</h4>
<div class="markdown level1 summary"><p>Draw text string into this document in next position.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawString(string text, Rect rc)</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>The text string of the paragraph.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.rect">Rect</a></td>
      <td><span class="parametername">rc</span></td>
      <td><p>The drawing rectangle.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Word_C1WordDocument_DrawString_" data-uid="C1.WPF.Word.C1WordDocument.DrawString*"></a>
<h4 id="C1_WPF_Word_C1WordDocument_DrawString_System_String_C1_WPF_Word_Font_System_Windows_Media_Color_System_Windows_Rect_" data-uid="C1.WPF.Word.C1WordDocument.DrawString(System.String,C1.WPF.Word.Font,System.Windows.Media.Color,System.Windows.Rect)">DrawString(string, Font, Color, Rect)</h4>
<div class="markdown level1 summary"><p>Draw text string into this document in next position.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawString(string text, Font font, Color clr, Rect rc)</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>The text string of the paragraph.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Word.Font.html">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p>The drawing font.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">clr</span></td>
      <td><p>The drawing color.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.rect">Rect</a></td>
      <td><span class="parametername">rc</span></td>
      <td><p>The drawing rectangle.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Word_C1WordDocument_DrawString_" data-uid="C1.WPF.Word.C1WordDocument.DrawString*"></a>
<h4 id="C1_WPF_Word_C1WordDocument_DrawString_System_String_C1_WPF_Word_Font_System_Windows_Media_Color_System_Windows_Rect_C1_WPF_Word_StringFormat_" data-uid="C1.WPF.Word.C1WordDocument.DrawString(System.String,C1.WPF.Word.Font,System.Windows.Media.Color,System.Windows.Rect,C1.WPF.Word.StringFormat)">DrawString(string, Font, Color, Rect, StringFormat)</h4>
<div class="markdown level1 summary"><p>Draw text string into this document in next position.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawString(string text, Font font, Color clr, Rect rc, StringFormat sf)</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>The text string of the paragraph.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Word.Font.html">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p>The drawing font.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">clr</span></td>
      <td><p>The drawing color.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.rect">Rect</a></td>
      <td><span class="parametername">rc</span></td>
      <td><p>The drawing rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Word.StringFormat.html">StringFormat</a></td>
      <td><span class="parametername">sf</span></td>
      <td><p>The drawing string format.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Word_C1WordDocument_DrawString_" data-uid="C1.WPF.Word.C1WordDocument.DrawString*"></a>
<h4 id="C1_WPF_Word_C1WordDocument_DrawString_System_Windows_Controls_TextBlock_System_Windows_Rect_System_Boolean_" data-uid="C1.WPF.Word.C1WordDocument.DrawString(System.Windows.Controls.TextBlock,System.Windows.Rect,System.Boolean)">DrawString(TextBlock, Rect, bool)</h4>
<div class="markdown level1 summary"><p>Draws a string into the specified rectangle.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawString(TextBlock tb, Rect rc, bool overlapping = false)</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.windows.controls.textblock">TextBlock</a></td>
      <td><span class="parametername">tb</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.textblock">TextBlock</a> that contains the text and formatting options.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.rect">Rect</a></td>
      <td><span class="parametername">rc</span></td>
      <td><p>A rectangle that specifies the size and position of the text, in points.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">overlapping</span></td>
      <td><p>Is overlapping or no exist TextBox object.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
