protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            IReadOnlyList<Certificate> certs = await CertificateStores.FindAllAsync();

            foreach (Certificate cert in certs)
            {
                var item = new CertificateItem
                {
                    Name = $"Subject: {cert.Subject}, Serial Number: {CryptographicBuffer.EncodeToHexString(CryptographicBuffer.CreateFromByteArray(cert.SerialNumber))}",
                    Certificate = cert
                };

                if (cert.IsPerUser)
                {
                    UserCertificateListView.Items.Add(item);
                }
                else
                {
                    AppCertificateListView.Items.Add(item);
                }
            }
        }
예제 #2
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            IReadOnlyList <Certificate> certs = await CertificateStores.FindAllAsync();

            foreach (Certificate cert in certs)
            {
                var item = new CertificateItem
                {
                    Name        = $"Subject: {cert.Subject}, Serial Number: {CryptographicBuffer.EncodeToHexString(CryptographicBuffer.CreateFromByteArray(cert.SerialNumber))}",
                    Certificate = cert
                };

                if (cert.IsPerUser)
                {
                    UserCertificateListView.Items.Add(item);
                }
                else
                {
                    AppCertificateListView.Items.Add(item);
                }
            }
        }