# C1.iOS.DataCollection.C1CollectionViewSource-1

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_iOS_DataCollection_C1CollectionViewSource_1" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1" class="text-break">C1CollectionViewSource&lt;T&gt; Class
</h1>
  <div class="markdown level0 summary"><p>This class is the bridge between <span class="xref">UIKit.UICollectionView</span> and <a class="xref" href="../C1.DataCollection/C1.DataCollection.C1DataCollection-1.html">C1DataCollection&lt;T&gt;</a>.
Using this class you'll get built-in sort, filter, grouping, refresh and load-on-demand features.</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">C1CollectionViewSource&lt;T&gt;</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.iOS.DataCollection.html">C1.iOS.DataCollection</a></h6>
  <h6><strong>Assembly</strong>: C1.iOS.DataCollection.dll</h6>
  <h5 id="C1_iOS_DataCollection_C1CollectionViewSource_1_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class C1CollectionViewSource&lt;T&gt; : UICollectionViewSource where T : class</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class C1CollectionViewSource(Of T As Class)
    Inherits UICollectionViewSource</code></pre>
  </div>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">T</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h5 id="C1_iOS_DataCollection_C1CollectionViewSource_1_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>Inherit this class and implement <span class="xref">GetItemCell</span> to set the cell appearance as you wish.</p>
</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_iOS_DataCollection_C1CollectionViewSource_1__ctor_UIKit_UICollectionView_" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.#ctor(UIKit.UICollectionView)">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.-ctor.html#C1_iOS_DataCollection_C1CollectionViewSource_1__ctor_UIKit_UICollectionView_">C1CollectionViewSource(UICollectionView)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.html">C1CollectionViewSource&lt;T&gt;</a> class.</p>
</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_iOS_DataCollection_C1CollectionViewSource_1_CollectionView" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.CollectionView">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.CollectionView.html#C1_iOS_DataCollection_C1CollectionViewSource_1_CollectionView">CollectionView</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the table view used to display the items.</p>
</td>
      </tr>
      <tr>
        <td id="C1_iOS_DataCollection_C1CollectionViewSource_1_CollectionViewLayout" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.CollectionViewLayout">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.CollectionViewLayout.html#C1_iOS_DataCollection_C1CollectionViewSource_1_CollectionViewLayout">CollectionViewLayout</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the collection view layout.</p>
</td>
      </tr>
      <tr>
        <td id="C1_iOS_DataCollection_C1CollectionViewSource_1_DataCollection" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.DataCollection">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.DataCollection.html#C1_iOS_DataCollection_C1CollectionViewSource_1_DataCollection">DataCollection</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the data collection which provides the data items.</p>
</td>
      </tr>
      <tr>
        <td id="C1_iOS_DataCollection_C1CollectionViewSource_1_EmptyMessageLabel" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.EmptyMessageLabel">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.EmptyMessageLabel.html#C1_iOS_DataCollection_C1CollectionViewSource_1_EmptyMessageLabel">EmptyMessageLabel</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the label displayed when there are no items.</p>
</td>
      </tr>
      <tr>
        <td id="C1_iOS_DataCollection_C1CollectionViewSource_1_ItemsSource" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.ItemsSource">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.ItemsSource.html#C1_iOS_DataCollection_C1CollectionViewSource_1_ItemsSource">ItemsSource</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the data collection which provides the data items.</p>
</td>
      </tr>
      <tr>
        <td id="C1_iOS_DataCollection_C1CollectionViewSource_1_RefreshControl" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.RefreshControl">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.RefreshControl.html#C1_iOS_DataCollection_C1CollectionViewSource_1_RefreshControl">RefreshControl</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the refresh control used by the user to refresh the list.</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_iOS_DataCollection_C1CollectionViewSource_1_GetCell_UIKit_UICollectionView_Foundation_NSIndexPath_" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.GetCell(UIKit.UICollectionView,Foundation.NSIndexPath)">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.GetCell.html#C1_iOS_DataCollection_C1CollectionViewSource_1_GetCell_UIKit_UICollectionView_Foundation_NSIndexPath_">GetCell(UICollectionView, NSIndexPath)</a>
        </td>
        <td class="markdown level1 summary"><p>Called by the table view to get populate the row at indexPath with a cell view.</p>
</td>
      </tr>
      <tr>
        <td id="C1_iOS_DataCollection_C1CollectionViewSource_1_GetGroupCell_UIKit_UICollectionView_Foundation_NSIndexPath_C1_DataCollection_IDataCollectionGroup_System_Object_System_Object__" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.GetGroupCell(UIKit.UICollectionView,Foundation.NSIndexPath,C1.DataCollection.IDataCollectionGroup{System.Object,System.Object})">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.GetGroupCell.html#C1_iOS_DataCollection_C1CollectionViewSource_1_GetGroupCell_UIKit_UICollectionView_Foundation_NSIndexPath_C1_DataCollection_IDataCollectionGroup_System_Object_System_Object__">GetGroupCell(UICollectionView, NSIndexPath, IDataCollectionGroup&lt;object, object&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the visual element representing a group(header) cell.</p>
</td>
      </tr>
      <tr>
        <td id="C1_iOS_DataCollection_C1CollectionViewSource_1_GetItem_Foundation_NSIndexPath_" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.GetItem(Foundation.NSIndexPath)">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.GetItem.html#C1_iOS_DataCollection_C1CollectionViewSource_1_GetItem_Foundation_NSIndexPath_">GetItem(NSIndexPath)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets an item from the <span class="xref">UIKit.UITableView</span> <span class="xref">Foundation.NSIndexPath</span>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_iOS_DataCollection_C1CollectionViewSource_1_GetItemCell_UIKit_UICollectionView_Foundation_NSIndexPath__0_" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.GetItemCell(UIKit.UICollectionView,Foundation.NSIndexPath,`0)">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.GetItemCell.html#C1_iOS_DataCollection_C1CollectionViewSource_1_GetItemCell_UIKit_UICollectionView_Foundation_NSIndexPath__0_">GetItemCell(UICollectionView, NSIndexPath, T)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the visual element representing an item.</p>
</td>
      </tr>
      <tr>
        <td id="C1_iOS_DataCollection_C1CollectionViewSource_1_GetItemsCount_UIKit_UICollectionView_System_IntPtr_" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.GetItemsCount(UIKit.UICollectionView,System.IntPtr)">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.GetItemsCount.html#C1_iOS_DataCollection_C1CollectionViewSource_1_GetItemsCount_UIKit_UICollectionView_System_IntPtr_">GetItemsCount(UICollectionView, nint)</a>
        </td>
        <td class="markdown level1 summary"><p>Called by the collection view to find out how many items are to be rendered in the
section specified by section.</p>
</td>
      </tr>
      <tr>
        <td id="C1_iOS_DataCollection_C1CollectionViewSource_1_GetViewForSupplementaryElement_UIKit_UICollectionView_Foundation_NSString_Foundation_NSIndexPath_" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.GetViewForSupplementaryElement(UIKit.UICollectionView,Foundation.NSString,Foundation.NSIndexPath)">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.GetViewForSupplementaryElement.html#C1_iOS_DataCollection_C1CollectionViewSource_1_GetViewForSupplementaryElement_UIKit_UICollectionView_Foundation_NSString_Foundation_NSIndexPath_">GetViewForSupplementaryElement(UICollectionView, NSString, NSIndexPath)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_iOS_DataCollection_C1CollectionViewSource_1_NumberOfSections_UIKit_UICollectionView_" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.NumberOfSections(UIKit.UICollectionView)">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.NumberOfSections.html#C1_iOS_DataCollection_C1CollectionViewSource_1_NumberOfSections_UIKit_UICollectionView_">NumberOfSections(UICollectionView)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the number of sections that are required to display the data.</p>
</td>
      </tr>
      <tr>
        <td id="C1_iOS_DataCollection_C1CollectionViewSource_1_Scrolled_UIKit_UIScrollView_" data-uid="C1.iOS.DataCollection.C1CollectionViewSource`1.Scrolled(UIKit.UIScrollView)">
          <a class="xref" href="C1.iOS.DataCollection.C1CollectionViewSource-1.Scrolled.html#C1_iOS_DataCollection_C1CollectionViewSource_1_Scrolled_UIKit_UIScrollView_">Scrolled(UIScrollView)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>

</div>
