title: Convert empty string values to null in TextBoxes for the entire application
body: <p>By default, a WPF <code>TextBox</code> binding sets a string property to an empty string if you first enter some text and then clear it again. I understand the logic for this choice but this means that the database can contain both <code>NULL</code> and empty string values for these fields.</p>
  
  <p>It would be good practice to always check for <code>NULL</code> and empty string when retrieving and using these values, but I want to tackle the problem at the core.</p>
  
  <p>There are several solutions: WPF <code>Converters</code>, convert empty strings to <code>NULL</code> in the business layer or using <code>TargetNullValue</code>:</p>
  
  <pre><code>&lt;TextBox Text="{Binding Value, TargetNullValue=''}"/&gt;
  </code></pre>
  
  <p>Unfortunately, these solutions need to be implemented for individual properties and <code>TextBoxes</code>.</p>
  
  <p>Is there a way to make all <code>TextBoxes</code> convert empty strings to <code>NULL</code> values?</p>