public void RefreshItems() { _listItems.Clear(); foreach (String alias in KeyStore.Aliases) { KeyStoreEntryType entryType; if (KeyStore.IsCertificateEntry(alias)) { entryType = KeyStoreEntryType.TrustCertEntry; } else if (KeyStore.IsKeyEntry(alias) && KeyStore.GetCertificateChain(alias) != null && KeyStore.GetCertificateChain(alias).Length != 0) { entryType = KeyStoreEntryType.KeyPairEntry; } else { entryType = KeyStoreEntryType.KeyEntry; } _listItems.Add(new ListItemEntry(entryType, alias, KeyStore.GetCertificate(alias).Certificate)); } }