title: WPF: TwoWay Binding doesn't update back
body: <p>I have the following custom control:</p>
  
  <pre><code>&lt;abc:MyControl MyProperty="{Binding FieldInMyModel, Mode=TwoWay}"&gt;
  </code></pre>
  
  <p>And in my custom control I have </p>
  
  <pre><code>public static readonly DependencyProperty MyPropertyProperty =
       DependencyProperty.Register("MyProperty", typeof(double), typeof(MyControl),
       new PropertyMetadata(0.0, OnMyPropertyChanged));
  
  public double MyProperty
  {
       get { return (double)GetValue(MyPropertyProperty ); }
       set { SetValue(MyPropertyProperty , value); }
  }
  
  private static void OnMyPropertyChanged(DependencyObject d, 
       DependencyPropertyChangedEventArgs e)
  {
       if (d is MyControl mc)
       {
            // here I check if the new value is valid for my scope.
            // if it is not I update it here to be valid
            var v = (double)e.NewValue;
            if (!mc.IsValidValue(v))
            {
                 v = mc.MakeValidValue(v);
                 mc.MyProperty = v;
            }
       }
  }
  </code></pre>
  
  <p>In my model I change the value of <code>FieldInMyModel</code> to be not valid for my scope. <code>OnMyPropertyChanged</code> is called, and after making a valid value from received invalid value I expect that the <code>FieldInMyModel</code> will be updated to have the new value of <code>MyProperty</code> but actually nothing happens. Any thought?</p>