private void ShowPassword_Checked(object sender, RoutedEventArgs e) { passwordBox.PasswordChar = '\0'; } private void ShowPassword_Unchecked(object sender, RoutedEventArgs e) { passwordBox.PasswordChar = '*'; }These event handlers are triggered when the Checkbox is checked or unchecked. In this example, the event handlers change the appearance of a password box based on the state of the Checkbox. Package library: This control is part of the WPF framework and is included in the System.Windows.Controls assembly.