private void PasswordChange_Click(object sender, RoutedEventArgs e) { if (passwordtextbox.Text != "enter new password" && passwordtextbox.Text != "" && passwordbox.Password != "") { methods.Changepassword(passwordbox.Password) } else { MessageBox.Show("Enter password"); } }