title: Bind TextBox with ReactiveUI and maintain Currency Format
body: <p>Is there a way to bind a <code>decimal</code> to a WPF TextBox and specify a <code>StringFormat</code> (in this case Currency)? I've tried doing this with a property in the View Model, but editing in the TextBox becomes a little quirky as it tries to apply the formatting after every keystroke:</p>
  
  <pre><code>public string Moneys
  {
      get
      {
          return string.Format("{0:C}", Model.Moneys);
      }
  
      set
      {
          if ( decimal.TryParse(value, NumberStyles.Currency, null, out decimal decimalValue) )
          {
              Model.Moneys = decimalValue;
          }
      }
  }
  </code></pre>
  
  <p>I tried setting the <code>DataContext</code> and used Xaml data binding instead. Xaml:</p>
  
  <pre><code>&lt;TextBox Text="{Binding Path=Moneys, StringFormat=C0}" /&gt;
  </code></pre>
  
  <p>Code behind:</p>
  
  <pre><code>this.WhenAnyValue(x =&gt; x.ViewModel.Model)
      .Subscribe(x =&gt;
     {
         DataContext = x;
     });
  </code></pre>
  
  <p>However, after changing <code>DataContext</code> the <code>{Binding}</code> does not change as I'd expected to.</p>
  
  <p>Is there a way to use <code>this.Bind</code> and specify the <code>StringFormat</code>? for me, that would be the ideal solution</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>In the case of setting the <code>DataContext</code>, I realised that I should just be assigning it to the <code>ViewModel</code> and when <code>ViewModel.Model</code> changes, the template reflects the changes as it should. Here's my updated xaml:</p>
  
  <pre><code>&lt;TextBox Text="{Binding Path=Model.Moneys, StringFormat=C0}" /&gt;
  </code></pre>
  
  <p>However, I would still like to know if you can set the <code>StringFormat</code> in the code behind using <code>ReactiveUI</code>.</p>