/// <summary> /// Method invoked when the user clicks on Use Windows Hello. /// Checks user's trustworthiness and enable Windows Hello. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void CheckBox_Click(object sender, RoutedEventArgs e) { if (UseWindowsHelloCheckBox.IsChecked == true) { if (await SecurityExtensions.Authenticate()) { UseWindowsHelloCheckBox.IsChecked = true; SecurityExtensions.RegisterKey(); } else { UseWindowsHelloCheckBox.IsChecked = false; SecurityExtensions.RemoveKey(); } } else { SecurityExtensions.RemoveKey(); } }