# C1.WPF.RichTextBox.C1StyleOverrideMerger.GetStyles

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_RichTextBox_C1StyleOverrideMerger_GetStyles_" data-uid="C1.WPF.RichTextBox.C1StyleOverrideMerger.GetStyles*">GetStyles Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_RichTextBox_C1StyleOverrideMerger_GetStyles_" data-uid="C1.WPF.RichTextBox.C1StyleOverrideMerger.GetStyles*"></a>
<h4 id="C1_WPF_RichTextBox_C1StyleOverrideMerger_GetStyles_C1_WPF_RichTextBox_Documents_C1TextRange_" data-uid="C1.WPF.RichTextBox.C1StyleOverrideMerger.GetStyles(C1.WPF.RichTextBox.Documents.C1TextRange)">GetStyles(C1TextRange)</h4>
<div 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>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public IEnumerable&lt;C1RangeStyle&gt; GetStyles(C1TextRange range)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetStyles(range As C1TextRange) As IEnumerable(Of C1RangeStyle)</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.Documents.C1TextRange.html">C1TextRange</a></td>
      <td><span class="parametername">range</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><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;</td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="C1.WPF.RichTextBox.IStyleOverride.GetStyles.html#C1_WPF_RichTextBox_IStyleOverride_GetStyles_C1_WPF_RichTextBox_Documents_C1TextRange_">IStyleOverride.GetStyles(C1TextRange)</a></div>
<h5 id="C1_WPF_RichTextBox_C1StyleOverrideMerger_GetStyles_C1_WPF_RichTextBox_Documents_C1TextRange__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The text ranges inside the returned collection of <a class="xref" href="C1.WPF.RichTextBox.C1RangeStyle.html">C1RangeStyle</a> must not overlap, and they must be ordered.
In other words, the <a class="xref" href="C1.WPF.RichTextBox.Documents.C1TextRange.End.html#C1_WPF_RichTextBox_Documents_C1TextRange_End">End</a> of a text range must be less or equal than the <a class="xref" href="C1.WPF.RichTextBox.Documents.C1TextRange.Start.html#C1_WPF_RichTextBox_Documents_C1TextRange_Start">Start</a> of the next one.</p>
</div>
</div>
