title: Want ValidationRule to keep focus
body: <p>I am setting up a binding on a TextBox, and the text cannot be blank (null, whitespace or otherwise).  I set up a ValidationRule as below:</p>
  
  <pre><code>internal class CannotBeBlankTextboxRule : ValidationRule
  {
      public String ErrorText { get; set; } = "The text cannot be blank.";
  
      public override ValidationResult Validate (Object value, CultureInfo cultureInfo)
      {
          var str = value as String;
  
          if (String.IsNullOrWhiteSpace(str))
              return (new ValidationResult(false, this.ErrorText));
  
          return (new ValidationResult(true, null));
      }
  }
  </code></pre>
  
  <p>It is working fine, but the window allows the user to click elsewhere and continue even though this error is there.</p>
  
  <p>Is there a way I can keep the TextBox from losing focus while the validation is failing?</p>