/// <summary>
        /// Initializes and binds a list of items to the table source.
        /// </summary>
        /// <param name="tableSource">A table source providing the list of items to display in the table.</param>
        /// <param name="imageCatalog">An optional remote image catalog to use if this table supports remote image downloading.</param>
        protected void BindTableSource(IPageableTableViewSource <TEntity> tableSource, RemoteImageCatalog imageCatalog = null)
        {
            Throw.IfArgumentNull(tableSource, nameof(tableSource));

            if (this.tableSource != null)
            {
                throw new InvalidOperationException("A table source has already been bound.");
            }

            this.tableSource       = tableSource;
            this.uiTableViewSource =
                new UIEntityTableViewSource <TEntity>(
                    this.TableView,
                    this.tableSource.Items,
                    this.tableSource.HasMorePages,
                    this.EstimateHeightForCell,
                    this.CreateTableCell,
                    this.CreateLoadingMorePagesCell,
                    this.RequestImageForCell,
                    this.OnRowSelected,
                    this.OnRowDeselected);

            this.uiTableViewSource.CellWillBeDisplayed += this.StartLoadingNextPageIfNeeded;
            this.TableView.Source = this.uiTableViewSource;
            this.imageCatalog     = imageCatalog;

            this.UpdateTableState();
        }
 /// <summary>
 /// Initializes and binds a list of items to the table source.
 /// </summary>
 /// <param name="tableSource">A table source providing the list of items to display in the table.</param>
 /// <param name="imageCatalog">An optional remote image catalog to use if this table supports remote image downloading.</param>
 protected void BindTableSource(ITableViewSource <TEntity> tableSource, RemoteImageCatalog imageCatalog = null)
 {
     Throw.IfArgumentNull(tableSource, nameof(tableSource));
     this.BindTableSource(new TableViewSourceWithoutPages(tableSource), imageCatalog);
 }