# C1.Win.FlexGrid.CellStyle.Render

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_FlexGrid_CellStyle_Render_" data-uid="C1.Win.FlexGrid.CellStyle.Render*">Render Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_FlexGrid_CellStyle_Render_" data-uid="C1.Win.FlexGrid.CellStyle.Render*"></a>
<h4 id="C1_Win_FlexGrid_CellStyle_Render_System_Drawing_Graphics_System_Drawing_Rectangle_System_String_System_Drawing_Image_C1_Win_FlexGrid_DrawCellFlags_C1_Win_FlexGrid_DrawColorMode_" data-uid="C1.Win.FlexGrid.CellStyle.Render(System.Drawing.Graphics,System.Drawing.Rectangle,System.String,System.Drawing.Image,C1.Win.FlexGrid.DrawCellFlags,C1.Win.FlexGrid.DrawColorMode)">Render(Graphics, Rectangle, string, Image, DrawCellFlags, DrawColorMode)</h4>
<div class="markdown level1 summary"><p>Renders a string and an image into a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object using this style.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Render(Graphics g, Rectangle rc, string str, Image img, DrawCellFlags flags, DrawColorMode colorMode = DrawColorMode.Color)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Render(g As Graphics, rc As Rectangle, str As String, img As Image, flags As DrawCellFlags, Optional colorMode As DrawColorMode = DrawColorMode.Color)</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to render into.</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">rc</span></td>
      <td><p>Area where the element will be displayed.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">str</span></td>
      <td><p>Text to render.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.image">Image</a></td>
      <td><span class="parametername">img</span></td>
      <td><p>Image to render.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.DrawCellFlags.html">DrawCellFlags</a></td>
      <td><span class="parametername">flags</span></td>
      <td><p>Combination of <a class="xref" href="C1.Win.FlexGrid.DrawCellFlags.html">DrawCellFlags</a> that determines which elements will be rendered.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.DrawColorMode.html">DrawColorMode</a></td>
      <td><span class="parametername">colorMode</span></td>
      <td><p>Rendering color mode.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_FlexGrid_CellStyle_Render_System_Drawing_Graphics_System_Drawing_Rectangle_System_String_System_Drawing_Image_C1_Win_FlexGrid_DrawCellFlags_C1_Win_FlexGrid_DrawColorMode__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method allows using <a class="xref" href="C1.Win.FlexGrid.CellStyle.html">CellStyle</a> objects to render objects outside the grid. It can be
useful when implementing owner-drawn applications and style editors for example.</p>
</div>


<a id="C1_Win_FlexGrid_CellStyle_Render_" data-uid="C1.Win.FlexGrid.CellStyle.Render*"></a>
<h4 id="C1_Win_FlexGrid_CellStyle_Render_System_Drawing_Graphics_System_Drawing_Rectangle_System_String_System_Drawing_Image_C1_Win_FlexGrid_DrawColorMode_" data-uid="C1.Win.FlexGrid.CellStyle.Render(System.Drawing.Graphics,System.Drawing.Rectangle,System.String,System.Drawing.Image,C1.Win.FlexGrid.DrawColorMode)">Render(Graphics, Rectangle, string, Image, DrawColorMode)</h4>
<div class="markdown level1 summary"><p>Renders a string and an image into a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object using this style.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Render(Graphics g, Rectangle rc, string str, Image img, DrawColorMode colorMode = DrawColorMode.Color)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Render(g As Graphics, rc As Rectangle, str As String, img As Image, Optional colorMode As DrawColorMode = DrawColorMode.Color)</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to render into.</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">rc</span></td>
      <td><p>Area where the element will be displayed.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">str</span></td>
      <td><p>Text to render.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.image">Image</a></td>
      <td><span class="parametername">img</span></td>
      <td><p>Image to render.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.DrawColorMode.html">DrawColorMode</a></td>
      <td><span class="parametername">colorMode</span></td>
      <td><p>Rendering color mode.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_FlexGrid_CellStyle_Render_" data-uid="C1.Win.FlexGrid.CellStyle.Render*"></a>
<h4 id="C1_Win_FlexGrid_CellStyle_Render_System_Drawing_Graphics_System_Drawing_Rectangle_System_String_C1_Win_FlexGrid_DrawColorMode_" data-uid="C1.Win.FlexGrid.CellStyle.Render(System.Drawing.Graphics,System.Drawing.Rectangle,System.String,C1.Win.FlexGrid.DrawColorMode)">Render(Graphics, Rectangle, string, DrawColorMode)</h4>
<div class="markdown level1 summary"><p>Renders a string and an image into a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object using this style.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Render(Graphics g, Rectangle rc, string str, DrawColorMode colorMode = DrawColorMode.Color)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Render(g As Graphics, rc As Rectangle, str As String, Optional colorMode As DrawColorMode = DrawColorMode.Color)</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to render into.</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">rc</span></td>
      <td><p>Area where the element will be displayed.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">str</span></td>
      <td><p>Text to render.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.DrawColorMode.html">DrawColorMode</a></td>
      <td><span class="parametername">colorMode</span></td>
      <td><p>Rendering color mode.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_FlexGrid_CellStyle_Render_" data-uid="C1.Win.FlexGrid.CellStyle.Render*"></a>
<h4 id="C1_Win_FlexGrid_CellStyle_Render_System_Drawing_Graphics_System_Drawing_Rectangle_System_Drawing_Image_C1_Win_FlexGrid_DrawColorMode_" data-uid="C1.Win.FlexGrid.CellStyle.Render(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Image,C1.Win.FlexGrid.DrawColorMode)">Render(Graphics, Rectangle, Image, DrawColorMode)</h4>
<div class="markdown level1 summary"><p>Renders a string and an image into a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object using this style.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Render(Graphics g, Rectangle rc, Image img, DrawColorMode colorMode = DrawColorMode.Color)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Render(g As Graphics, rc As Rectangle, img As Image, Optional colorMode As DrawColorMode = DrawColorMode.Color)</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to render into.</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">rc</span></td>
      <td><p>Area where the element will be displayed.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.image">Image</a></td>
      <td><span class="parametername">img</span></td>
      <td><p>Image to render.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.DrawColorMode.html">DrawColorMode</a></td>
      <td><span class="parametername">colorMode</span></td>
      <td><p>Rendering color mode.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
