private void UpdateResults()
        {
            if (!IsSearchQueryValid(SearchQuery))
            {
                if (SearchResults != null)
                {
                    SearchResults.Clear();
                }
                NoResults  = true;
                _totalHits = 0;
                return;
            }

            if (SearchResults != null)
            {
                _totalHits = 0;
                RaisePropertyChanged("SearchResultsNumber");
                // clear the search results and reload the incremental collection
                SearchResults.Reset();
            }
            else
            {
                IncremetalLoadingCollection.getMore getMoreItemsAsync = SearchQueryAsync;
                SearchResults = new IncremetalLoadingCollection(getMoreItemsAsync);
            }
        }
        private async Task <bool> PopulateDataAsync()
        {
            try
            {
                // fill featured maps collection
                IncremetalLoadingCollection.getMore getMoreItemsAsync0 = FeaturedQueryAsync;
                FeaturedItems       = new IncremetalLoadingCollection(getMoreItemsAsync0);
                FeaturedItems.Title = "Featured";

                // fill most recent maps collection
                IncremetalLoadingCollection.getMore getMoreItemsAsync1 = RecentQueryAsync;
                RecentItems       = new IncremetalLoadingCollection(getMoreItemsAsync1);
                RecentItems.Title = "Most Recent";

                // fill most popular maps collection
                IncremetalLoadingCollection.getMore getMoreItemsAsync2 = HighestRatedQueryAsync;
                MostPopularItems       = new IncremetalLoadingCollection(getMoreItemsAsync2);
                MostPopularItems.Title = "Most Popular";

                // fill favorite maps collection
                FavoriteItems       = new FavoritesViewModel();
                FavoriteItems.Title = "Favorites";

                // fill the groups collection
                var portalGroupItems = await GetPortalGroupsAsync();

                if (portalGroupItems != null)
                {
                    PortalGroups = new PortalGroupCollection(portalGroupItems, "Groups");
                }
                else
                {
                    PortalGroups = null;
                }

                // fill the user's maps collection
                var myMaps = await GetMyMapsAsync();

                if (myMaps != null)
                {
                    MyMaps = new PortalItemCollection(myMaps, "My Maps");
                }
                else
                {
                    MyMaps = null;
                }

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
        private async Task<bool> PopulateDataAsync()
        {
            try
            {
                // fill featured maps collection
                IncremetalLoadingCollection.getMore getMoreItemsAsync0 = FeaturedQueryAsync;
                FeaturedItems = new IncremetalLoadingCollection(getMoreItemsAsync0);                                
                FeaturedItems.Title = "Featured";

                // fill most recent maps collection
                IncremetalLoadingCollection.getMore getMoreItemsAsync1 = RecentQueryAsync;
                RecentItems = new IncremetalLoadingCollection(getMoreItemsAsync1);
                RecentItems.Title = "Most Recent";

                // fill most popular maps collection  
                IncremetalLoadingCollection.getMore getMoreItemsAsync2 = HighestRatedQueryAsync;
                MostPopularItems = new IncremetalLoadingCollection(getMoreItemsAsync2);
                MostPopularItems.Title = "Most Popular";

                // fill favorite maps collection  
                FavoriteItems = new FavoritesViewModel();
                FavoriteItems.Title = "Favorites";

                // fill the groups collection
                var portalGroupItems = await GetPortalGroupsAsync();
                if (portalGroupItems != null)
                    PortalGroups = new PortalGroupCollection(portalGroupItems, "Groups");
                else
                    PortalGroups = null;

                // fill the user's maps collection
                var myMaps = await GetMyMapsAsync();
                if (myMaps != null)
                    MyMaps = new PortalItemCollection(myMaps, "My Maps");
                else
                    MyMaps = null;

                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }
        private void UpdateResults()
        {
            if (!IsSearchQueryValid(SearchQuery))
            {
                if (SearchResults != null) 
                    SearchResults.Clear();
                NoResults = true;
                _totalHits = 0;
                return;
            }

            if (SearchResults != null)
            {
                _totalHits = 0;
                RaisePropertyChanged("SearchResultsNumber");
                // clear the search results and reload the incremental collection
                SearchResults.Reset();
            }
            else
            {
                IncremetalLoadingCollection.getMore getMoreItemsAsync = SearchQueryAsync;
                SearchResults = new IncremetalLoadingCollection(getMoreItemsAsync);
            }
        }