title: Binding multiple textbox values to single property
body: <p>I was wondering if there is way to bind multiple textboxes to a single property in VM and a single validation logic. Perhaps a good example of that would be a typical Serial Number in any product activation process. Usually, when asked to enter serial number, the end user has, say, 5 text boxes with 5 max symbols.</p>
  
  <p>Now lets imagine that in my VM I have only one property called SerialNumber. So my XAML would look like this:</p>
  
  <pre><code>&lt;StackPanel Orientation="Horizontal"&gt;
      &lt;TextBox Text="{Binding SerialNumber}"/&gt;
      &lt;TextBox Text="{Binding SerialNumber}"/&gt;
      &lt;TextBox Text="{Binding SerialNumber}"/&gt;
      &lt;TextBox Text="{Binding SerialNumber}"/&gt;
      &lt;TextBox Text="{Binding SerialNumber}"/&gt;
  &lt;StackPanel&gt;
  </code></pre>
  
  <p><br/> And my code will be like this:</p>
  
  <pre><code>class ViewModel
  {
      public string SerialNumber{get;set;}
  }
  </code></pre>
  
  <p>Is there a way to bind these textboxes so that they each point ot the same property on VM and that property is updated only when the validation on all 5 textboxes passes?</p>
  
  <p><strong>EDIT</strong>: As some posters pointed out, yes, I could go with 5 separate properties for each textbox, the problem with that is that the actual situation is much more complex than in the example that I've provided. One of the reasons that the suggested approach is unfavorable is because this view will be reused in multiple places with different VM classes and going with the 5 properties approach I would have to copy them in each and every VM class that will use this View. If it were only as simple as taking five string properties and concatenating them, it would be tolerable. But in the real world scenario there is a very complicated verification, validation and combination logic behind these properties, that it makes it impractical to rewrite the same logic in each and every VM, which is why I'm looking for something reusable, something that could be done in XAML as much as possible. I was wondering if BindingGroup with some sort of ValidationRule and ValueConverter could be used in this case.</p>