Windows.Security.Credentials.PasswordVault.RetrieveAll C# (CSharp) Method

RetrieveAll() public method

public RetrieveAll ( ) : IVectorView
return IVectorView
		public extern IVectorView<PasswordCredential> RetrieveAll();
	}

Usage Example

        void ChangeUser_Click(object sender, RoutedEventArgs e)
        {
            Page outputFrame = (Page)rootPage.OutputFrame.Content;
            Page inputFrame  = (Page)rootPage.InputFrame.Content;

            try
            {
                Windows.Security.Credentials.PasswordVault vault = new Windows.Security.Credentials.PasswordVault();
                IReadOnlyList <PasswordCredential>         creds = vault.RetrieveAll();
                foreach (PasswordCredential c in creds)
                {
                    try
                    {
                        vault.Remove(c);
                    }
                    catch (Exception Error) // Stored credential was deleted
                    {
                        DebugPrint(Error.ToString());
                    }
                }
            }
            catch (Exception Error) // No stored credentials, so none to delete
            {
                DebugPrint(Error.ToString());
            }
            Reset1();
            CleanCombobox();
            CheckBox AuthenticationFailCheck = outputFrame.FindName("AuthenticationFailCheck") as CheckBox;

            AuthenticationFailCheck.IsChecked = false;
            TextBox WelcomeMessage = inputFrame.FindName("WelcomeMessage") as TextBox;

            WelcomeMessage.Text = "User has been changed, please resign in with new credentials, choose save and launch scenario again";
        }
All Usage Examples Of Windows.Security.Credentials.PasswordVault::RetrieveAll