# GrapeCity.ActiveReports.Drawing.ITextMetricsProvider.MeasureString

## Content

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



<h1 id="GrapeCity_ActiveReports_Drawing_ITextMetricsProvider_MeasureString_" data-uid="GrapeCity.ActiveReports.Drawing.ITextMetricsProvider.MeasureString*">MeasureString Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Drawing_ITextMetricsProvider_MeasureString_" data-uid="GrapeCity.ActiveReports.Drawing.ITextMetricsProvider.MeasureString*"></a>
<h4 id="GrapeCity_ActiveReports_Drawing_ITextMetricsProvider_MeasureString_GrapeCity_ActiveReports_Drawing_FontInfo_System_String_GrapeCity_ActiveReports_Drawing_StringFormatEx_System_Single_System_Single_" data-uid="GrapeCity.ActiveReports.Drawing.ITextMetricsProvider.MeasureString(GrapeCity.ActiveReports.Drawing.FontInfo,System.String,GrapeCity.ActiveReports.Drawing.StringFormatEx,System.Single,System.Single)">MeasureString(FontInfo, string, StringFormatEx, float, float)</h4>
<div class="markdown level1 summary"><p>Measures string content based on currently selected font, device capabilities, string format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">TextMetrics MeasureString(FontInfo font, string contentText, StringFormatEx stringFormat, float boundWidth = 3.4028235E+38, float boundHeight = 3.4028235E+38)</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="GrapeCity.ActiveReports.Drawing.FontInfo.html">FontInfo</a></td>
      <td><span class="parametername">font</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">contentText</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.Drawing.StringFormatEx.html">StringFormatEx</a></td>
      <td><span class="parametername">stringFormat</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">boundWidth</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">boundHeight</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.Drawing.TextMetrics.html">TextMetrics</a></td>
      <td><p>The <a class="xref" href="GrapeCity.ActiveReports.Drawing.TextMetrics.html">TextMetrics</a> structure that contains numbers of lines of text and total chars fitted in available bounds and minimal desired bounds to fit the text.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
