title: Reset MaskedTextBox's ValidatingType in the Win Forms Designer
body: <p>In a Windows Forms application, I add a MaskedTextBox to the form. Clicking the ellipsis on the Mask property opens up the Input Mask dialog. In it, I set the mask to a short date, leaving the Use ValidatingType checkbox checked.</p>
  
  <p>This results in the next two lines in the designer generated code;</p>
  
  <pre><code>this.maskedTextBox1.Mask = "00/00/0000";
  this.maskedTextBox1.ValidatingType = typeof(System.DateTime);
  </code></pre>
  
  <p>Now, when I want to revert back this change, I'd expect to be able to right click on the Mask property of the control, and select <code>Reset</code>. Doing that does reset the Mask property itself, but leaves the ValidatingType property untouched. Since the ValidatingType property itself isn't visible in the designer, there doesn't seem to be a way to reset this property using the Designer.</p>
  
  <p>I've also tried going back into the Input Mask dialog box and setting the mask to <code>&lt;Custom&gt;</code>, which doesn't have a validating type, but it still keeps the existing ValidatingType in the designer generated code.</p>
  
  <hr>
  
  <p>So, is there a way to reset the ValidatingType property using the Designer? Or do I actually have to go into the designer generated code and make the change myself?</p>
  
  <hr>
  
  <p><strong>Update</strong></p>
  
  <p>Based on Hans' answer, I found another way. After right clicking on the Mask property and choosing <code>Reset</code>, <strong>only</strong> the Mask property itself gets cleared. The Input Mask Dialog you get after clicking the ellipsis sets both the Mask and the ValidatingType properties.</p>
  
  <p>So... using Reset isn't good enough. After using Reset, you have to go into the Input Mask dialog again and click Ok.</p>
  
  <p>I still feel it is a bit buggy that the Reset doesn't reset the ValidatingType, while the dialog opened up by the ellipsis in the same property does set it.</p>