public ConfigurationPageModel()
 {
     var configurationsCollectionSource = new ConfigurationsCollectionSource();
     Configurations = new VirtualCollection<ConfigurationModel>(configurationsCollectionSource, 30, 10);
     SelectedItems = new ItemSelection<VirtualItem<ConfigurationModel>>();
     IsSearchVisible = new Observable<bool>();
     SearchPattern = new Observable<string>() { Value = "" };
     SearchPattern.ObserveChanged().Throttle(TimeSpan.FromSeconds(1)).Subscribe(value => configurationsCollectionSource.Prefix = value);
 }
		public FilesPageModel()
		{
            filesSource = new FileSystemCollectionSource();
            Files = new VirtualCollection<FileSystemModel>(filesSource, DefaultPageSize, DefaultCacheSize);
            SelectedFile = new Observable<VirtualItem<FileSystemModel>>();
            CurrentFolder = new Observable<string>() { Value = "/"};
            CurrentFolder.PropertyChanged += delegate
                                                 {
                                                     filesSource.CurrentFolder = CurrentFolder.Value;
                                                     UpdateBreadCrumbs();
                                                     ApplicationModel.Current.Client.Notifications.FolderChanges(
                                                         CurrentFolder.Value)
                                                         .TakeUntil(Unloaded.Amb(CurrentFolder.ObserveChanged().Select(_ => Unit.Default)))
                                                         .SampleResponsive(TimeSpan.FromSeconds(1))
                                                         .ObserveOn(DispatcherScheduler.Instance)
                                                         .Subscribe(_ => Files.Refresh(RefreshMode.PermitStaleDataWhilstRefreshing));
                                                 };

            SearchPattern = new Observable<string>() { Value=""};
		    SearchPattern.ObserveChanged().Throttle(TimeSpan.FromSeconds(1)).Where(SearchPatternIsValid).Subscribe(value => filesSource.SearchPattern = value);
            SelectedItems = new ItemSelection<VirtualItem<FileSystemModel>>();

            IsSearchVisible = new Observable<bool>();

            BreadcrumbTrail = new ObservableCollection<DirectoryModel>();
		}