# C1.WPF.RichTextBox.C1PainterMerger.Paint

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_RichTextBox_C1PainterMerger_Paint_" data-uid="C1.WPF.RichTextBox.C1PainterMerger.Paint*">Paint Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_RichTextBox_C1PainterMerger_Paint_" data-uid="C1.WPF.RichTextBox.C1PainterMerger.Paint*"></a>
<h4 id="C1_WPF_RichTextBox_C1PainterMerger_Paint_C1_WPF_RichTextBox_C1PaintingContext_" data-uid="C1.WPF.RichTextBox.C1PainterMerger.Paint(C1.WPF.RichTextBox.C1PaintingContext)">Paint(C1PaintingContext)</h4>
<div class="markdown level1 summary"><p>This method is called each time the <a class="xref" href="C1.WPF.RichTextBox.C1RichTextViewManager.html">C1RichTextViewManager</a> paints.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Paint(C1PaintingContext context)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Paint(context As C1PaintingContext)</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.WPF.RichTextBox.C1PaintingContext.html">C1PaintingContext</a></td>
      <td><span class="parametername">context</span></td>
      <td><p>A <a class="xref" href="C1.WPF.RichTextBox.C1PaintingContext.html">C1PaintingContext</a> providing information for the current document
section being painted.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="C1.WPF.RichTextBox.IRichTextPainter.Paint.html#C1_WPF_RichTextBox_IRichTextPainter_Paint_C1_WPF_RichTextBox_C1PaintingContext_">IRichTextPainter.Paint(C1PaintingContext)</a></div>
<h5 id="C1_WPF_RichTextBox_C1PainterMerger_Paint_C1_WPF_RichTextBox_C1PaintingContext__remarks">Remarks</h5>
<div class="markdown level1 remarks"><pre><code>&lt;p&gt;
</code></pre>
<p>Any UIElement that is to be painted with the rich text is passed to <a class="xref" href="C1.WPF.RichTextBox.C1PaintingContext.Paint.html#C1_WPF_RichTextBox_C1PaintingContext_Paint_System_Double_System_Double_System_Boolean_System_Windows_FrameworkElement_">Paint(double, double, bool, FrameworkElement)</a>.
Note that each time this method is called, all UIElements must be painted by calling <a class="xref" href="C1.WPF.RichTextBox.C1PaintingContext.Paint.html#C1_WPF_RichTextBox_C1PaintingContext_Paint_System_Double_System_Double_System_Boolean_System_Windows_FrameworkElement_">Paint(double, double, bool, FrameworkElement)</a>,
otherwise they will be removed. Passing the same UIElement each time is more efficient, as it is not removed from the visual tree.</p>

</div>
</div>
