# C1.WPF.RichTextBox.C1RangeStyleCollection

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_RichTextBox_C1RangeStyleCollection" data-uid="C1.WPF.RichTextBox.C1RangeStyleCollection" class="text-break">C1RangeStyleCollection Class
</h1>
  <div class="markdown level0 summary"><p>An implementation of <a class="xref" href="C1.WPF.RichTextBox.IStyleOverride.html">IStyleOverride</a> that provides an easy way to
override styles with a pre calculated collection of <a class="xref" href="C1.WPF.RichTextBox.C1RangeStyle.html">C1RangeStyle</a>.</p>
</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"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.collection-1">Collection</a>&lt;<a class="xref" href="C1.WPF.RichTextBox.C1RangeStyle.html">C1RangeStyle</a>&gt;</div>
    <div class="level2"><span class="xref">C1RangeStyleCollection</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a>&lt;<a class="xref" href="C1.WPF.RichTextBox.C1RangeStyle.html">C1RangeStyle</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a>&lt;<a class="xref" href="C1.WPF.RichTextBox.C1RangeStyle.html">C1RangeStyle</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ilist">IList</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.icollection">ICollection</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;<a class="xref" href="C1.WPF.RichTextBox.C1RangeStyle.html">C1RangeStyle</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlycollection-1">IReadOnlyCollection</a>&lt;<a class="xref" href="C1.WPF.RichTextBox.C1RangeStyle.html">C1RangeStyle</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="C1.WPF.RichTextBox.C1RangeStyle.html">C1RangeStyle</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
    <div><a class="xref" href="C1.WPF.RichTextBox.IStyleOverride.html">IStyleOverride</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.RichTextBox.html">C1.WPF.RichTextBox</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.RichTextBox.dll</h6>
  <h5 id="C1_WPF_RichTextBox_C1RangeStyleCollection_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class C1RangeStyleCollection : Collection&lt;C1RangeStyle&gt;, IList&lt;C1RangeStyle&gt;, ICollection&lt;C1RangeStyle&gt;, IList, ICollection, IReadOnlyList&lt;C1RangeStyle&gt;, IReadOnlyCollection&lt;C1RangeStyle&gt;, IEnumerable&lt;C1RangeStyle&gt;, IEnumerable, IStyleOverride</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class C1RangeStyleCollection
    Inherits Collection(Of C1RangeStyle)
    Implements IList(Of C1RangeStyle), ICollection(Of C1RangeStyle), IList, ICollection, IReadOnlyList(Of C1RangeStyle), IReadOnlyCollection(Of C1RangeStyle), IEnumerable(Of C1RangeStyle), IEnumerable, IStyleOverride</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_WPF_RichTextBox_C1RangeStyleCollection__ctor" data-uid="C1.WPF.RichTextBox.C1RangeStyleCollection.#ctor">
          <a class="xref" href="C1.WPF.RichTextBox.C1RangeStyleCollection.-ctor.html#C1_WPF_RichTextBox_C1RangeStyleCollection__ctor">C1RangeStyleCollection()</a>
        </td>
        <td class="markdown level1 summary"></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_WPF_RichTextBox_C1RangeStyleCollection_ClearItems" data-uid="C1.WPF.RichTextBox.C1RangeStyleCollection.ClearItems">
          <a class="xref" href="C1.WPF.RichTextBox.C1RangeStyleCollection.ClearItems.html#C1_WPF_RichTextBox_C1RangeStyleCollection_ClearItems">ClearItems()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_WPF_RichTextBox_C1RangeStyleCollection_GetStyles_C1_WPF_RichTextBox_Documents_C1TextRange_" data-uid="C1.WPF.RichTextBox.C1RangeStyleCollection.GetStyles(C1.WPF.RichTextBox.Documents.C1TextRange)">
          <a class="xref" href="C1.WPF.RichTextBox.C1RangeStyleCollection.GetStyles.html#C1_WPF_RichTextBox_C1RangeStyleCollection_GetStyles_C1_WPF_RichTextBox_Documents_C1TextRange_">GetStyles(C1TextRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns a collection of <a class="xref" href="C1.WPF.RichTextBox.C1RangeStyle.html">C1RangeStyle</a> objects to apply to the text inside the parameter <a class="xref" href="C1.WPF.RichTextBox.Documents.C1TextRange.html">C1TextRange</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_RichTextBox_C1RangeStyleCollection_InsertItem_System_Int32_C1_WPF_RichTextBox_C1RangeStyle_" data-uid="C1.WPF.RichTextBox.C1RangeStyleCollection.InsertItem(System.Int32,C1.WPF.RichTextBox.C1RangeStyle)">
          <a class="xref" href="C1.WPF.RichTextBox.C1RangeStyleCollection.InsertItem.html#C1_WPF_RichTextBox_C1RangeStyleCollection_InsertItem_System_Int32_C1_WPF_RichTextBox_C1RangeStyle_">InsertItem(int, C1RangeStyle)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_WPF_RichTextBox_C1RangeStyleCollection_RemoveItem_System_Int32_" data-uid="C1.WPF.RichTextBox.C1RangeStyleCollection.RemoveItem(System.Int32)">
          <a class="xref" href="C1.WPF.RichTextBox.C1RangeStyleCollection.RemoveItem.html#C1_WPF_RichTextBox_C1RangeStyleCollection_RemoveItem_System_Int32_">RemoveItem(int)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_WPF_RichTextBox_C1RangeStyleCollection_RemoveRange_C1_WPF_RichTextBox_Documents_C1TextRange_" data-uid="C1.WPF.RichTextBox.C1RangeStyleCollection.RemoveRange(C1.WPF.RichTextBox.Documents.C1TextRange)">
          <a class="xref" href="C1.WPF.RichTextBox.C1RangeStyleCollection.RemoveRange.html#C1_WPF_RichTextBox_C1RangeStyleCollection_RemoveRange_C1_WPF_RichTextBox_Documents_C1TextRange_">RemoveRange(C1TextRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Removes all <a class="xref" href="C1.WPF.RichTextBox.C1RangeStyle.html">C1RangeStyle</a> items whose range intersects with the parameter range.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_RichTextBox_C1RangeStyleCollection_SetItem_System_Int32_C1_WPF_RichTextBox_C1RangeStyle_" data-uid="C1.WPF.RichTextBox.C1RangeStyleCollection.SetItem(System.Int32,C1.WPF.RichTextBox.C1RangeStyle)">
          <a class="xref" href="C1.WPF.RichTextBox.C1RangeStyleCollection.SetItem.html#C1_WPF_RichTextBox_C1RangeStyleCollection_SetItem_System_Int32_C1_WPF_RichTextBox_C1RangeStyle_">SetItem(int, C1RangeStyle)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>
  <h3 id="events">Events
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_RichTextBox_C1RangeStyleCollection_StylesChanged" data-uid="C1.WPF.RichTextBox.C1RangeStyleCollection.StylesChanged">
          <a class="xref" href="C1.WPF.RichTextBox.C1RangeStyleCollection.StylesChanged.html">StylesChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Fired when the styles of this <a class="xref" href="C1.WPF.RichTextBox.IStyleOverride.html">IStyleOverride</a> change.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
