# C1.Framework.Element.Measure

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Framework_Element_Measure_" data-uid="C1.Framework.Element.Measure*">Measure Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Framework_Element_Measure_" data-uid="C1.Framework.Element.Measure*"></a>
<h4 id="C1_Framework_Element_Measure_System_Drawing_Graphics_System_Object_" data-uid="C1.Framework.Element.Measure(System.Drawing.Graphics,System.Object)">Measure(Graphics, object)</h4>
<div class="markdown level1 summary"><p>Provides the size, in pixels, of the specified content drawn on the specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> surface.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Size Measure(Graphics g, object value)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Measure(g As Graphics, value As Object) As Size</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.drawing.graphics">Graphics</a></td>
      <td><span class="parametername">g</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to use for measuring.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>The content to measure.</p>
</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="https://learn.microsoft.com/dotnet/api/system.drawing.size">Size</a></td>
      <td><p>The desired <a class="xref" href="C1.Framework.Element.Size.html#C1_Framework_Element_Size">Size</a>, in pixels, of the content drawn in a single line with the current style settings in the specified device context.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Framework_Element_Measure_" data-uid="C1.Framework.Element.Measure*"></a>
<h4 id="C1_Framework_Element_Measure_C1_Framework_Style_System_Drawing_Graphics_System_Object_" data-uid="C1.Framework.Element.Measure(C1.Framework.Style,System.Drawing.Graphics,System.Object)">Measure(Style, Graphics, object)</h4>
<div class="markdown level1 summary"><p>Provides the size, in pixels, of the specified content drawn on the specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> surface with the specified style.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Size Measure(Style s, Graphics g, object value)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Measure(s As Style, g As Graphics, value As Object) As Size</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">s</span></td>
      <td><p>The <a class="xref" href="C1.Framework.Element.Style.html#C1_Framework_Element_Style">Style</a> object to use.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a></td>
      <td><span class="parametername">g</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to use for measuring.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>The content to measure.</p>
</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="https://learn.microsoft.com/dotnet/api/system.drawing.size">Size</a></td>
      <td><p>The desired <a class="xref" href="C1.Framework.Element.Size.html#C1_Framework_Element_Size">Size</a>, in pixels, of the content drawn in a single line with the specified style settings in the specified device context.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Framework_Element_Measure_" data-uid="C1.Framework.Element.Measure*"></a>
<h4 id="C1_Framework_Element_Measure_System_Drawing_Graphics_System_Object_System_Int32_" data-uid="C1.Framework.Element.Measure(System.Drawing.Graphics,System.Object,System.Int32)">Measure(Graphics, object, int)</h4>
<div class="markdown level1 summary"><p>Provides the size, in pixels, of the specified content drawn on the specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> surface within the rectangle of the specified width.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Size Measure(Graphics g, object value, int width)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Measure(g As Graphics, value As Object, width As Integer) As Size</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.drawing.graphics">Graphics</a></td>
      <td><span class="parametername">g</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to use for measuring.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>The content to measure.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The available width.</p>
</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="https://learn.microsoft.com/dotnet/api/system.drawing.size">Size</a></td>
      <td><p>The desired <a class="xref" href="C1.Framework.Element.Size.html#C1_Framework_Element_Size">Size</a>, in pixels, of the content drawn in within the rectangle of the specified width with the current style settings in the specified device context.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Framework_Element_Measure_" data-uid="C1.Framework.Element.Measure*"></a>
<h4 id="C1_Framework_Element_Measure_C1_Framework_Style_System_Drawing_Graphics_System_Object_System_Int32_" data-uid="C1.Framework.Element.Measure(C1.Framework.Style,System.Drawing.Graphics,System.Object,System.Int32)">Measure(Style, Graphics, object, int)</h4>
<div class="markdown level1 summary"><p>Provides the size, in pixels, of the specified content drawn on the specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> surface within the rectangle of the specified width with the specified style settings.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Size Measure(Style s, Graphics g, object value, int width)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Measure(s As Style, g As Graphics, value As Object, width As Integer) As Size</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">s</span></td>
      <td><p>The <a class="xref" href="C1.Framework.Element.Style.html#C1_Framework_Element_Style">Style</a> object to use.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a></td>
      <td><span class="parametername">g</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to use for measuring.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>The content to measure.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The available width.</p>
</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="https://learn.microsoft.com/dotnet/api/system.drawing.size">Size</a></td>
      <td><p>The desired <a class="xref" href="C1.Framework.Element.Size.html#C1_Framework_Element_Size">Size</a>, in pixels, of the content drawn in within the rectangle of the specified width with the specified style settings in the specified device context.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
