private void SetItemSource() { ShowProgressBar(); Task.Factory.StartNew(() => { Task.Delay(5000); projs = VSTSService.GetVSTSProjects(); }).ContinueWith(async(Task t) => { await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { source = new List <ItemDetails>(); foreach (var proj in projs) { source.Add(new ItemDetails(proj.Name)); } itemSource = AlphaKeyGroup <ItemDetails> .CreateGroups(source, CultureInfo.CurrentUICulture, s => s.Name, true); ((CollectionViewSource)Resources["ProjectGroups"]).Source = itemSource; manuallyselected = true; HideProgressBar(); }); }); }