# C1.Framework.Drawing.Gdi.Graphics.DrawString

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Framework_Drawing_Gdi_Graphics_DrawString_" data-uid="C1.Framework.Drawing.Gdi.Graphics.DrawString*">DrawString Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Framework_Drawing_Gdi_Graphics_DrawString_" data-uid="C1.Framework.Drawing.Gdi.Graphics.DrawString*"></a>
<h4 id="C1_Framework_Drawing_Gdi_Graphics_DrawString_System_String_C1_Framework_Drawing_Gdi_Font_C1_Framework_Drawing_Gdi_Brush_System_Drawing_Point_C1_Framework_Drawing_Gdi_StringFormat_" data-uid="C1.Framework.Drawing.Gdi.Graphics.DrawString(System.String,C1.Framework.Drawing.Gdi.Font,C1.Framework.Drawing.Gdi.Brush,System.Drawing.Point,C1.Framework.Drawing.Gdi.StringFormat)">DrawString(string, Font, Brush, Point, StringFormat)</h4>
<div class="markdown level1 summary"><p>Draws the specified text string at the specified location with the specified
Brush and Font objects using the formatting attributes of the specified StringFormat object.</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 s, Font font, Brush brush, Point point, StringFormat format)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawString(s As String, font As Font, brush As Brush, point As Point, format As StringFormat)</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">s</span></td>
      <td><p>String to draw.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Framework.Drawing.Gdi.Font.html">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p>Font object that defines the text format of the string.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Framework.Drawing.Gdi.Brush.html">Brush</a></td>
      <td><span class="parametername">brush</span></td>
      <td><p>Brush object that determines the color and texture of the drawn text.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.point">Point</a></td>
      <td><span class="parametername">point</span></td>
      <td><p>Point structure that specifies the upper-left corner of the drawn text.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Framework.Drawing.Gdi.StringFormat.html">StringFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p>StringFormat object that specifies formatting attributes, such as line spacing and alignment,
that are applied to the drawn text.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Framework_Drawing_Gdi_Graphics_DrawString_" data-uid="C1.Framework.Drawing.Gdi.Graphics.DrawString*"></a>
<h4 id="C1_Framework_Drawing_Gdi_Graphics_DrawString_System_String_C1_Framework_Drawing_Gdi_Font_C1_Framework_Drawing_Gdi_Brush_System_Drawing_Rectangle_C1_Framework_Drawing_Gdi_StringFormat_" data-uid="C1.Framework.Drawing.Gdi.Graphics.DrawString(System.String,C1.Framework.Drawing.Gdi.Font,C1.Framework.Drawing.Gdi.Brush,System.Drawing.Rectangle,C1.Framework.Drawing.Gdi.StringFormat)">DrawString(string, Font, Brush, Rectangle, StringFormat)</h4>
<div class="markdown level1 summary"><p>Draws the specified text string in the specified rectangle with the specified
Brush and Font objects using the formatting attributes of the specified StringFormat object.</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 s, Font font, Brush brush, Rectangle layoutRectangle, StringFormat format)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawString(s As String, font As Font, brush As Brush, layoutRectangle As Rectangle, format As StringFormat)</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">s</span></td>
      <td><p>String to draw.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Framework.Drawing.Gdi.Font.html">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p>Font object that defines the text format of the string.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Framework.Drawing.Gdi.Brush.html">Brush</a></td>
      <td><span class="parametername">brush</span></td>
      <td><p>Brush object that determines the color and texture of the drawn text.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectangle">Rectangle</a></td>
      <td><span class="parametername">layoutRectangle</span></td>
      <td><p>Rectangle structure that specifies the location of the drawn text.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Framework.Drawing.Gdi.StringFormat.html">StringFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p>StringFormat object that specifies formatting attributes, such as line spacing and alignment,
that are applied to the drawn text.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
