title: Is there a way to disable or 'soften' the visual effects of validation errors at the initial state?
body: <p>What I have so far is: A WPF application, using MVVM, IDataErrorInfo implemented. Everything is working as expected.</p>
  
  <p>Every time I open a "Create New Entity" dialog, the user is saluted with a nice form, flashing red all over the place. This is expected in a pure validation point of view, but it is annoying and I would like to be able to do either one of two thing.</p>
  
  <ol>
  <li>"Soften" the red error highlighting color to lets say orange, or yellow, to indicate "Required field". Subsequently, when the user starts interacting with the controls switch to the red highlighting</li>
  <li>If that's not possible, is there a way to disable error highlighting @ initial state?</li>
  </ol>
  
  <p>I found this post <a href="https://stackoverflow.com/questions/2821998/how-can-i-get-wpf-to-not-display-validation-errors-upon-initial-display-of-contro">How can I get WPF to NOT display validation errors upon initial display of control?</a> dealing with the same problem, but it is not really answered. </p>
  
  <p>I considered implementing a "Clear All error" within my IDataErrorInfo implementation, as well as implementing an InitialState flag, so errors wont be added until at least one field was changed by the user, but those have side-effects. </p>
  
  <ol>
  <li>If I clear all errors after init, the validation is off, but the submit button is, of course, enabled :(</li>
  <li>If I use an InitialState flag, which is also bound to the submit button to disable it... I get one step further, but then ALL errors are added with the change in one single property field. </li>
  </ol>
  
  <p>So before I go and add InitState flags for EACH property, I though I stop and ask if there might be a simpler, more generic solution to this.</p>
  
  <p>I can post some code if required. However, I implement the IDataErrorInfo in a standard way, a <code>Dictionary&lt;string,string&gt;</code> for the error messages, the Property Fields with OnChange Events and a switch case statement to call individual validation methods.</p>
  
  <p>EDIT:
  Here is what I ended up with.</p>
  
  <ol>
  <li>I added an <code>IsInitState=true</code> flag for each 'Required' field property in the VM</li>
  <li><p>In the setter code this flag is set to false on first change</p>
  
  <pre><code>        if (Name != value)
          {
              Name = value;
              IsInitState_Name = false; 
              base.OnPropertyChanged("Name");
          }
  </code></pre></li>
  <li><p>In the ValidateName (), the Null/empty test is conditional based on the flag</p>
  
  <p>if (!IsInitState_Name &amp;&amp; String.IsNullOrEmpty(this.Name))</p></li>
  <li><p>Submit button "canExecute" checks if all flags are == false before enabling submit</p></li>
  <li><p>It's some extra work, but only needed for "required / non-null able" properties. Now the Create new interface is initially without error messages yet validation is fully functional</p></li>
  </ol>