# C1.Win.Document.Util.C1RichText

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Win_Document_Util_C1RichText" data-uid="C1.Win.Document.Util.C1RichText" class="text-break">C1RichText Class
</h1>
  <div class="markdown level0 summary"></div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">C1RichText</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Win.Document.Util.html">C1.Win.Document.Util</a></h6>
  <h6><strong>Assembly</strong>: C1.Win.Document.10.dll</h6>
  <h5 id="C1_Win_Document_Util_C1RichText_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class C1RichText : Object, IDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class C1RichText
    Inherits Object
    Implements IDisposable</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText__ctor" data-uid="C1.Win.Document.Util.C1RichText.#ctor">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.-ctor.html#C1_Win_Document_Util_C1RichText__ctor">C1RichText()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_InfiniteHeightTw" data-uid="C1.Win.Document.Util.C1RichText.InfiniteHeightTw">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.InfiniteHeightTw.html">InfiniteHeightTw</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_InfiniteWidthTw" data-uid="C1.Win.Document.Util.C1RichText.InfiniteWidthTw">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.InfiniteWidthTw.html">InfiniteWidthTw</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_DetectUrls" data-uid="C1.Win.Document.Util.C1RichText.DetectUrls">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.DetectUrls.html#C1_Win_Document_Util_C1RichText_DetectUrls">DetectUrls</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether or not the C1RichText will automatically
format a Uniform Resource Locator (URL).</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_Handle" data-uid="C1.Win.Document.Util.C1RichText.Handle">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.Handle.html#C1_Win_Document_Util_C1RichText_Handle">Handle</a>
        </td>
        <td class="markdown level1 summary"><p>Handle of native API window which is used.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_TextLength" data-uid="C1.Win.Document.Util.C1RichText.TextLength">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.TextLength.html#C1_Win_Document_Util_C1RichText_TextLength">TextLength</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the length of text, length of real text will be calculated,
the length of RTF tags will not taken into account.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_Transparent" data-uid="C1.Win.Document.Util.C1RichText.Transparent">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.Transparent.html#C1_Win_Document_Util_C1RichText_Transparent">Transparent</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the value indicating whether the RTF is transparent when painting.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_CheckRtf_System_String__" data-uid="C1.Win.Document.Util.C1RichText.CheckRtf(System.String@)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.CheckRtf.html#C1_Win_Document_Util_C1RichText_CheckRtf_System_String__">CheckRtf(ref string)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_CopyFrom_C1_Win_Document_Util_C1RichText_" data-uid="C1.Win.Document.Util.C1RichText.CopyFrom(C1.Win.Document.Util.C1RichText)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.CopyFrom.html#C1_Win_Document_Util_C1RichText_CopyFrom_C1_Win_Document_Util_C1RichText_">CopyFrom(C1RichText)</a>
        </td>
        <td class="markdown level1 summary"><p>Copies properties of another C1RichText object.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_Dispose" data-uid="C1.Win.Document.Util.C1RichText.Dispose">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.Dispose.html#C1_Win_Document_Util_C1RichText_Dispose">Dispose()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_Dispose_System_Boolean_" data-uid="C1.Win.Document.Util.C1RichText.Dispose(System.Boolean)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.Dispose.html#C1_Win_Document_Util_C1RichText_Dispose_System_Boolean_">Dispose(bool)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_DrawOrMeasure_System_Drawing_Graphics_System_Drawing_Graphics_C1_Interop_Rect_System_Int32_System_Int32_System_Boolean_" data-uid="C1.Win.Document.Util.C1RichText.DrawOrMeasure(System.Drawing.Graphics,System.Drawing.Graphics,C1.Interop.Rect,System.Int32,System.Int32,System.Boolean)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.DrawOrMeasure.html#C1_Win_Document_Util_C1RichText_DrawOrMeasure_System_Drawing_Graphics_System_Drawing_Graphics_C1_Interop_Rect_System_Int32_System_Int32_System_Boolean_">DrawOrMeasure(Graphics, Graphics, Rect, int, int, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Draws or measures the RTF text.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_Finalize" data-uid="C1.Win.Document.Util.C1RichText.Finalize">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.Finalize.html#C1_Win_Document_Util_C1RichText_Finalize">Finalize()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_GetContent_System_UInt32_System_Boolean_" data-uid="C1.Win.Document.Util.C1RichText.GetContent(System.UInt32,System.Boolean)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.GetContent.html#C1_Win_Document_Util_C1RichText_GetContent_System_UInt32_System_Boolean_">GetContent(uint, bool)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_GetRtf" data-uid="C1.Win.Document.Util.C1RichText.GetRtf">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.GetRtf.html#C1_Win_Document_Util_C1RichText_GetRtf">GetRtf()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the object's content as RTF text.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_GetRtfMetafile_System_Drawing_Graphics_System_String_System_Int32_System_Int32_C1_Interop_Rect_System_Boolean_" data-uid="C1.Win.Document.Util.C1RichText.GetRtfMetafile(System.Drawing.Graphics,System.String,System.Int32,System.Int32,C1.Interop.Rect,System.Boolean)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.GetRtfMetafile.html#C1_Win_Document_Util_C1RichText_GetRtfMetafile_System_Drawing_Graphics_System_String_System_Int32_System_Int32_C1_Interop_Rect_System_Boolean_">GetRtfMetafile(Graphics, string, int, int, Rect, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Draws specified RTF text into metafile and returns this metafile.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_GetRtfMetafileBytes_System_Drawing_Graphics_System_String_System_Int32_System_Int32_C1_Interop_Rect_System_Boolean_" data-uid="C1.Win.Document.Util.C1RichText.GetRtfMetafileBytes(System.Drawing.Graphics,System.String,System.Int32,System.Int32,C1.Interop.Rect,System.Boolean)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.GetRtfMetafileBytes.html#C1_Win_Document_Util_C1RichText_GetRtfMetafileBytes_System_Drawing_Graphics_System_String_System_Int32_System_Int32_C1_Interop_Rect_System_Boolean_">GetRtfMetafileBytes(Graphics, string, int, int, Rect, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Draws specified RTF text into metafile and returns metafile's data,
<code class="paramref">bounds</code> should be specified in twips.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_GetSelectedRtf" data-uid="C1.Win.Document.Util.C1RichText.GetSelectedRtf">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.GetSelectedRtf.html#C1_Win_Document_Util_C1RichText_GetSelectedRtf">GetSelectedRtf()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the selected RTF text, text can be selected with using SetSelection
method.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_GetText" data-uid="C1.Win.Document.Util.C1RichText.GetText">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.GetText.html#C1_Win_Document_Util_C1RichText_GetText">GetText()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the object's content as simple text.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_Load_System_IO_Stream_System_Windows_Forms_RichTextBoxStreamType_" data-uid="C1.Win.Document.Util.C1RichText.Load(System.IO.Stream,System.Windows.Forms.RichTextBoxStreamType)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.Load.html#C1_Win_Document_Util_C1RichText_Load_System_IO_Stream_System_Windows_Forms_RichTextBoxStreamType_">Load(Stream, RichTextBoxStreamType)</a>
        </td>
        <td class="markdown level1 summary"><p>Loads the object's content from stream.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_Load_System_String_System_Windows_Forms_RichTextBoxStreamType_" data-uid="C1.Win.Document.Util.C1RichText.Load(System.String,System.Windows.Forms.RichTextBoxStreamType)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.Load.html#C1_Win_Document_Util_C1RichText_Load_System_String_System_Windows_Forms_RichTextBoxStreamType_">Load(string, RichTextBoxStreamType)</a>
        </td>
        <td class="markdown level1 summary"><p>Loads the object's content from specified file.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_PerformDrawOrMeasure_System_Drawing_Graphics_System_Drawing_Graphics_System_Drawing_Rectangle_System_Int32_System_Int32_System_Boolean_System_Drawing_Rectangle__System_Int32__System_Boolean__" data-uid="C1.Win.Document.Util.C1RichText.PerformDrawOrMeasure(System.Drawing.Graphics,System.Drawing.Graphics,System.Drawing.Rectangle,System.Int32,System.Int32,System.Boolean,System.Drawing.Rectangle@,System.Int32@,System.Boolean@)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.PerformDrawOrMeasure.html#C1_Win_Document_Util_C1RichText_PerformDrawOrMeasure_System_Drawing_Graphics_System_Drawing_Graphics_System_Drawing_Rectangle_System_Int32_System_Int32_System_Boolean_System_Drawing_Rectangle__System_Int32__System_Boolean__">PerformDrawOrMeasure(Graphics, Graphics, Rectangle, int, int, bool, ref Rectangle, ref int, ref bool)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_PerformDrawOrMeasure_System_IntPtr_System_IntPtr_System_Drawing_Rectangle_System_Int32_System_Int32_System_Boolean_System_Drawing_Rectangle__System_Int32__System_Boolean__" data-uid="C1.Win.Document.Util.C1RichText.PerformDrawOrMeasure(System.IntPtr,System.IntPtr,System.Drawing.Rectangle,System.Int32,System.Int32,System.Boolean,System.Drawing.Rectangle@,System.Int32@,System.Boolean@)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.PerformDrawOrMeasure.html#C1_Win_Document_Util_C1RichText_PerformDrawOrMeasure_System_IntPtr_System_IntPtr_System_Drawing_Rectangle_System_Int32_System_Int32_System_Boolean_System_Drawing_Rectangle__System_Int32__System_Boolean__">PerformDrawOrMeasure(IntPtr, IntPtr, Rectangle, int, int, bool, ref Rectangle, ref int, ref bool)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_SetFont_System_Drawing_Font_" data-uid="C1.Win.Document.Util.C1RichText.SetFont(System.Drawing.Font)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.SetFont.html#C1_Win_Document_Util_C1RichText_SetFont_System_Drawing_Font_">SetFont(Font)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets default font, it used when assigned RTF do define a font.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_SetForeColor_System_Drawing_Color_" data-uid="C1.Win.Document.Util.C1RichText.SetForeColor(System.Drawing.Color)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.SetForeColor.html#C1_Win_Document_Util_C1RichText_SetForeColor_System_Drawing_Color_">SetForeColor(Color)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_SetParagraphAlignment_C1_Win_Document_Util_C1RichText_ParagraphAlignment_" data-uid="C1.Win.Document.Util.C1RichText.SetParagraphAlignment(C1.Win.Document.Util.C1RichText.ParagraphAlignment)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.SetParagraphAlignment.html#C1_Win_Document_Util_C1RichText_SetParagraphAlignment_C1_Win_Document_Util_C1RichText_ParagraphAlignment_">SetParagraphAlignment(ParagraphAlignment)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_SetRtf_System_String_" data-uid="C1.Win.Document.Util.C1RichText.SetRtf(System.String)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.SetRtf.html#C1_Win_Document_Util_C1RichText_SetRtf_System_String_">SetRtf(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets RTF text to the object.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_SetSelection_System_Int32_System_Int32_" data-uid="C1.Win.Document.Util.C1RichText.SetSelection(System.Int32,System.Int32)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.SetSelection.html#C1_Win_Document_Util_C1RichText_SetSelection_System_Int32_System_Int32_">SetSelection(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the selection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_SetText_System_String_" data-uid="C1.Win.Document.Util.C1RichText.SetText(System.String)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.SetText.html#C1_Win_Document_Util_C1RichText_SetText_System_String_">SetText(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the specified text to the object, this methods sets text
using SF_UNICODE flag.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Document_Util_C1RichText_ValidRtf_System_String_" data-uid="C1.Win.Document.Util.C1RichText.ValidRtf(System.String)">
          <a class="xref" href="C1.Win.Document.Util.C1RichText.ValidRtf.html#C1_Win_Document_Util_C1RichText_ValidRtf_System_String_">ValidRtf(string)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>

</div>
