# C1.C1Preview.RenderFragment.Draw

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_RenderFragment_Draw_" data-uid="C1.C1Preview.RenderFragment.Draw*">Draw Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_RenderFragment_Draw_" data-uid="C1.C1Preview.RenderFragment.Draw*"></a>
<h4 id="C1_C1Preview_RenderFragment_Draw_System_Drawing_Graphics_System_Drawing_Rectangle_System_Drawing_Rectangle_System_Boolean_C1_C1Preview_PageDrawParams_" data-uid="C1.C1Preview.RenderFragment.Draw(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Rectangle,System.Boolean,C1.C1Preview.PageDrawParams)">Draw(Graphics, Rectangle, Rectangle, bool, PageDrawParams)</h4>
<div class="markdown level1 summary"><p>Draws the current fragment on a specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual void Draw(Graphics graphics, Rectangle boundsPx, Rectangle parentContentBoundsPx, bool renderChildren, PageDrawParams pdp)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Sub Draw(graphics As Graphics, boundsPx As Rectangle, parentContentBoundsPx As Rectangle, renderChildren As Boolean, pdp As PageDrawParams)</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">graphics</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to draw on.</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">boundsPx</span></td>
      <td><p>The draw bounds.</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">parentContentBoundsPx</span></td>
      <td><p>The paretnt bounds.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">renderChildren</span></td>
      <td><p><b>true</b> to draw child fragments, <b>false</b> to ignore them.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.PageDrawParams.html">PageDrawParams</a></td>
      <td><span class="parametername">pdp</span></td>
      <td><p>Specifies additional parameters of drawing.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_RenderFragment_Draw_" data-uid="C1.C1Preview.RenderFragment.Draw*"></a>
<h4 id="C1_C1Preview_RenderFragment_Draw_System_Drawing_Graphics_System_Drawing_Rectangle_System_Drawing_Rectangle_System_Boolean_System_Boolean_System_Boolean_" data-uid="C1.C1Preview.RenderFragment.Draw(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Rectangle,System.Boolean,System.Boolean,System.Boolean)">Draw(Graphics, Rectangle, Rectangle, bool, bool, bool)</h4>
<div class="markdown level1 summary"><p>Draws the current fragment on a specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Draw(Graphics graphics, Rectangle boundsPx, Rectangle parentContentBoundsPx, bool renderInputControls, bool renderChildren, bool writeMetafileComments)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Draw(graphics As Graphics, boundsPx As Rectangle, parentContentBoundsPx As Rectangle, renderInputControls As Boolean, renderChildren As Boolean, writeMetafileComments As Boolean)</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">graphics</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to draw on.</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">boundsPx</span></td>
      <td><p>The draw bounds.</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">parentContentBoundsPx</span></td>
      <td><p>The paretnt bounds.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">renderInputControls</span></td>
      <td><p><b>true</b> to draw input controls (see <a class="xref" href="C1.C1Preview.RenderInputBase.html">RenderInputBase</a>), <b>false</b> to ignore them.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">renderChildren</span></td>
      <td><p><b>true</b> to draw child fragments, <b>false</b> to ignore them.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">writeMetafileComments</span></td>
      <td><p>Indicates whether to write metafile comments to graphics: info about anchors, hyperlinks etc.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_RenderFragment_Draw_" data-uid="C1.C1Preview.RenderFragment.Draw*"></a>
<h4 id="C1_C1Preview_RenderFragment_Draw_System_Drawing_Graphics_System_Drawing_Rectangle_System_Boolean_" data-uid="C1.C1Preview.RenderFragment.Draw(System.Drawing.Graphics,System.Drawing.Rectangle,System.Boolean)">Draw(Graphics, Rectangle, bool)</h4>
<div class="markdown level1 summary"><p>Draws the current fragment and its children on a specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Draw(Graphics graphics, Rectangle parentContentBoundsPx, bool renderInputControls)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Draw(graphics As Graphics, parentContentBoundsPx As Rectangle, renderInputControls As Boolean)</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">graphics</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to draw on.</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">parentContentBoundsPx</span></td>
      <td><p>The paretnt bounds.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">renderInputControls</span></td>
      <td><p><b>true</b> to draw input controls (see <a class="xref" href="C1.C1Preview.RenderInputBase.html">RenderInputBase</a>), <b>false</b> to ignore them.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_RenderFragment_Draw_" data-uid="C1.C1Preview.RenderFragment.Draw*"></a>
<h4 id="C1_C1Preview_RenderFragment_Draw_System_Drawing_Graphics_System_Drawing_Rectangle_System_Boolean_System_Boolean_" data-uid="C1.C1Preview.RenderFragment.Draw(System.Drawing.Graphics,System.Drawing.Rectangle,System.Boolean,System.Boolean)">Draw(Graphics, Rectangle, bool, bool)</h4>
<div class="markdown level1 summary"><p>Draws the current fragment and its children on a specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Draw(Graphics graphics, Rectangle parentContentBoundsPx, bool renderInputControls, bool writeMetafileComments)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Draw(graphics As Graphics, parentContentBoundsPx As Rectangle, renderInputControls As Boolean, writeMetafileComments As Boolean)</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">graphics</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to draw on.</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">parentContentBoundsPx</span></td>
      <td><p>The paretnt bounds.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">renderInputControls</span></td>
      <td><p><b>true</b> to draw input controls (see <a class="xref" href="C1.C1Preview.RenderInputBase.html">RenderInputBase</a>), <b>false</b> to ignore them.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">writeMetafileComments</span></td>
      <td><p><b>true</b> to write metafile comments containing anchors, hyperlinks etc.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_RenderFragment_Draw_" data-uid="C1.C1Preview.RenderFragment.Draw*"></a>
<h4 id="C1_C1Preview_RenderFragment_Draw_System_Drawing_Graphics_System_Boolean_" data-uid="C1.C1Preview.RenderFragment.Draw(System.Drawing.Graphics,System.Boolean)">Draw(Graphics, bool)</h4>
<div class="markdown level1 summary"><p>Draws the current fragment and its children on a specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Draw(Graphics graphics, bool renderInputControls)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Draw(graphics As Graphics, renderInputControls As Boolean)</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">graphics</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to draw on.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">renderInputControls</span></td>
      <td><p><b>true</b> to draw input controls (see <a class="xref" href="C1.C1Preview.RenderInputBase.html">RenderInputBase</a>), <b>false</b> to ignore them.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
