using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Controls;
using Expression.Blend.SampleData.SampleDataSource;

namespace LogicalPaging
{
    public partial class MainPage : UserControl
    {
public MainPage()
{
    this.InitializeComponent();

    var pagedCollectionView = new LogicallyPagedCollectionView<Item>(new SampleDataSource().Collection);
    pagedCollectionView.PageCount = 26;
    pagedCollectionView.PagingPredicate =
        (i) => i.Property1.ToLower().StartsWith(PageIndexToCharConverter.Convert(pagedCollectionView.PageIndex).ToString());

    this.DataContext = pagedCollectionView;
}
    }
}