title: WPF C# How to validate textbox input as Date format
body: <p>I have some textboxes where the user enters a date or a time.
  When I save on database I create </p>
  
  <pre><code>string input = txtdocumentiDate.Text +" "+ txtdocumentiTime.Text;
          ts.Documenti = DateTime.ParseExact(input, "dd/MM/yyyy HH.mm", CultureInfo.InvariantCulture);
  </code></pre>
  
  <p>(ts is my entity framework database table)</p>
  
  <p>I would want to make a check to see if all the formats of my textboxes are valid before fire button save.</p>