private void ShowDefintionDetails() { if (releaseDefList == null || releaseDefList.Count < 1 || ifRefresh) { ShowProgressBar(); Task.Factory.StartNew(() => { releaseDefList = VSTSService.GetReleaseDefinitions(); }).ContinueWith(async(Task t) => { await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { if (releaseDefList != null) { source = new List <ItemDetails>(); foreach (var bd in releaseDefList) { source.Add(new ItemDetails(bd.Name)); } itemSource = AlphaKeyGroup <ItemDetails> .CreateGroups(source, CultureInfo.CurrentUICulture, s => s.Name, true); ((CollectionViewSource)Resources["DefinitionGroups"]).Source = itemSource; manuallyselected = true; HideProgressBar(); } else { Utility.ShowMsg("Unable to get release definitions list. Check internet connection and try again later."); } }); }); } else { ((CollectionViewSource)Resources["DefinitionGroups"]).Source = itemSource; manuallyselected = true; } }