title: UWP XamlBindingHelper.ConvertValue throws an AccessViolationException when converting Decimal Values
body: <p>I created a simple XAML form using MVVM Light using UWP Platform. Up until now, I've never had an issue with databinding, but after creating a few textboxes bound to decimal properties, it throws the following exception in the code generated view file.</p>
  
  <blockquote>
    <p>System.AccessViolationException occurred
      HResult=0x80004003
      Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
      Source=
      StackTrace:
    </p>
  </blockquote>
  
  <p>The error only occurs in case 12, but not in case 11.  The ConvertValue appears to be at fault.</p>
  
  <pre><code>                case 11: // Views\QuotesPage.xaml line 82
                      this.obj11 = (global::Windows.UI.Xaml.Controls.ToggleSwitch)target;
                      (this.obj11).RegisterPropertyChangedCallback(global::Windows.UI.Xaml.Controls.ToggleSwitch.IsOnProperty,
                          (global::Windows.UI.Xaml.DependencyObject sender, global::Windows.UI.Xaml.DependencyProperty prop) =&gt;
                          {
                          if (this.initialized)
                          {
                              // Update Two Way binding
                              this.dataRoot.ViewModel.SignatureRequiredOnDelivery = this.obj11.IsOn;
                          }
                      });
                      break;
                  case 12: // Views\QuotesPage.xaml line 85
                      this.obj12 = (global::Windows.UI.Xaml.Controls.TextBox)target;
                      (this.obj12).LostFocus += (global::System.Object sender, global::Windows.UI.Xaml.RoutedEventArgs e) =&gt;
                      {
                          if (this.initialized)
                          {
                              // Update Two Way binding
                              this.dataRoot.ViewModel.InsuredValue = (global::System.Decimal) global::Windows.UI.Xaml.Markup.XamlBindingHelper.ConvertValue(typeof(global::System.Decimal), this.obj12.Text);
                          }
                      };
                      break;
  </code></pre>
  
  <p>Here's my block of XAML:</p>
  
  <pre><code>                &lt;TextBlock Text="Weight" Grid.Row="1" Grid.Column="2" /&gt;
              &lt;TextBox Text="{x:Bind Mode=TwoWay, Path=ViewModel.Weight}" Grid.Column="3" Grid.Row="1" x:Name="weight" /&gt;
  
              &lt;TextBlock Text="Signature Required On Delivery" Grid.Row="2" Grid.Column="0" /&gt;
              &lt;ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SignatureRequiredOnDelivery}" Grid.Column="1" Grid.Row="2" x:Name="signatureRequiredOnDelivery" /&gt;
  
              &lt;TextBlock Text="Insured Value" Grid.Row="3" Grid.Column="0" /&gt;
              &lt;TextBox Text="{x:Bind Mode=TwoWay, Path=ViewModel.InsuredValue}" Grid.Column="1" Grid.Row="3" x:Name="insuredValue" /&gt;
  
              &lt;TextBlock Text="Is Oversize" Grid.Row="4" Grid.Column="0" /&gt;
              &lt;ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsOversize}" Grid.Column="1" Grid.Row="4" x:Name="isOversize" Height="40" Width="154" /&gt;
  </code></pre>
  
  <p>Here's my view model:
          private bool _signatureRequiredOnDelivery;
          public bool SignatureRequiredOnDelivery
          {
              get => _signatureRequiredOnDelivery;
              set => Set(ref _signatureRequiredOnDelivery, value);
          }</p>
  
  <pre><code>    private decimal _insuredValue = decimal.Zero;
      public decimal InsuredValue
      {
          get =&gt; _insuredValue;
          set =&gt; Set(ref _insuredValue, value);
      }
  </code></pre>