diff --git a/DataGridAsyncDemoMVVM/DataGridAsyncDemoMVVM.csproj b/DataGridAsyncDemoMVVM/DataGridAsyncDemoMVVM.csproj
index 76088dd..0864128 100644
--- a/DataGridAsyncDemoMVVM/DataGridAsyncDemoMVVM.csproj
+++ b/DataGridAsyncDemoMVVM/DataGridAsyncDemoMVVM.csproj
@@ -72,6 +72,8 @@
MSBuild:Compile
Designer
+
+
@@ -85,7 +87,7 @@
-
+
MSBuild:Compile
Designer
diff --git a/DataGridAsyncDemoMVVM/MainViewModel.cs b/DataGridAsyncDemoMVVM/MainViewModel.cs
index 7cfae0c..2dd288f 100644
--- a/DataGridAsyncDemoMVVM/MainViewModel.cs
+++ b/DataGridAsyncDemoMVVM/MainViewModel.cs
@@ -1,54 +1,82 @@
-using System;
-using System.ComponentModel;
-using System.Diagnostics;
+using System.ComponentModel;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Data;
using AlphaChiTech.Virtualization;
using DataGridAsyncDemoMVVM.filtersort;
using GalaSoft.MvvmLight.Command;
+using SortDescription = DataGridAsyncDemoMVVM.filtersort.SortDescription;
namespace DataGridAsyncDemoMVVM
{
internal class MainViewModel
{
+ private readonly VirtualizingObservableCollection
+ _myDataVirtualizedAsyncFilterSortObservableCollection;
+
private readonly RemoteOrDbDataSourceAsyncProxy _myRemoteOrDbDataSourceAsyncProxy;
- private VirtualizingObservableCollection myDataVirtualizedAsyncFilterSortObservableCollection;
+
+ private int _filterWaitingCount;
public MainViewModel()
{
- this._myRemoteOrDbDataSourceAsyncProxy = new RemoteOrDbDataSourceAsyncProxy(new RemoteOrDbDataSourceEmulation(100));
- this.myDataVirtualizedAsyncFilterSortObservableCollection =
+ this._myRemoteOrDbDataSourceAsyncProxy =
+ new RemoteOrDbDataSourceAsyncProxy(new RemoteOrDbDataSourceEmulation(100));
+ this._myDataVirtualizedAsyncFilterSortObservableCollection =
new VirtualizingObservableCollection(
new PaginationManager(this._myRemoteOrDbDataSourceAsyncProxy,
pageSize: 10, maxPages: 2));
this.MyDataVirtualizedAsyncFilterSortObservableCollectionCollectionView =
- CollectionViewSource.GetDefaultView(myDataVirtualizedAsyncFilterSortObservableCollection);
+ CollectionViewSource.GetDefaultView(this._myDataVirtualizedAsyncFilterSortObservableCollection);
- this.FilterCommand = new RelayCommand