# C1.WPF.ListView.ListViewSelection

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_ListView_ListViewSelection" data-uid="C1.WPF.ListView.ListViewSelection" class="text-break">ListViewSelection Class
</h1>
  <div class="markdown level0 summary"><p>Represents the selection of a <a class="xref" href="C1.WPF.ListView.C1ListView.html">C1ListView</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"><span class="xref">ListViewSelection</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <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.ListView.ListViewItem.html">ListViewItem</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.ListView.ListViewItem.html">ListViewItem</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.ListView.ListViewItem.html">ListViewItem</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.ListView.html">C1.WPF.ListView</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.ListView.dll</h6>
  <h5 id="C1_WPF_ListView_ListViewSelection_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ListViewSelection : IReadOnlyList&lt;ListViewItem&gt;, IReadOnlyCollection&lt;ListViewItem&gt;, IEnumerable&lt;ListViewItem&gt;, IEnumerable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class ListViewSelection
    Implements IReadOnlyList(Of ListViewItem), IReadOnlyCollection(Of ListViewItem), IEnumerable(Of ListViewItem), IEnumerable</code></pre>
  </div>
  <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_WPF_ListView_ListViewSelection_Count" data-uid="C1.WPF.ListView.ListViewSelection.Count">
          <a class="xref" href="C1.WPF.ListView.ListViewSelection.Count.html#C1_WPF_ListView_ListViewSelection_Count">Count</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the number of selected items.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_ListView_ListViewSelection_Item_System_Int32_" data-uid="C1.WPF.ListView.ListViewSelection.Item(System.Int32)">
          <a class="xref" href="C1.WPF.ListView.ListViewSelection.Item.html#C1_WPF_ListView_ListViewSelection_Item_System_Int32_">this[int]</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the selected item at the specified index.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_ListView_ListViewSelection_Ranges" data-uid="C1.WPF.ListView.ListViewSelection.Ranges">
          <a class="xref" href="C1.WPF.ListView.ListViewSelection.Ranges.html#C1_WPF_ListView_ListViewSelection_Ranges">Ranges</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the selected indexes.</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_WPF_ListView_ListViewSelection_GetEnumerator" data-uid="C1.WPF.ListView.ListViewSelection.GetEnumerator">
          <a class="xref" href="C1.WPF.ListView.ListViewSelection.GetEnumerator.html#C1_WPF_ListView_ListViewSelection_GetEnumerator">GetEnumerator()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the enumerator.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
