private void RefreshPublicKeys() { List <EcKeyPairInfoViewModel> loadedKeys; try { loadedKeys = new LocalStorageManager().GetAll <EcKeyPairInfoViewModel>(StorageNames.PublicKeys.ToString()).ToList(); } catch (Exception e) { loadedKeys = Enumerable.Empty <EcKeyPairInfoViewModel>().ToList(); } DispatcherHelper.CheckBeginInvokeOnUI(() => { this.PublicKeys = new ObservableCollection <EcKeyPairInfoViewModel>(loadedKeys); if (!loadedKeys.Any()) { this.PublicKeysNotAvailable = true; } this.PublicKeysIsBusy = false; }); }