private void GetProjectsCanExecute(object sender, CanExecuteRoutedEventArgs e) { if (this.tbUser.Text.Length > 0 && this.passwordBox1.SecurePassword.Length > 0) { e.CanExecute = true; } else { e.CanExecute = false; } }