OneWay binding stops working after the target manually updated

后端 未结 4 680
长情又很酷
长情又很酷 2021-01-12 05:10

I have such WPF binding code:

TestModel source = new TestModel();
TestModel target = new TestModel();

Bind(source, target, BindingMode.OneWay);

source.Attr         


        
4条回答
  •  無奈伤痛
    2021-01-12 05:57

    Not a binding expert but I believe you are running into a WPF dependency property precedence issues. It's likely that setting the value directly takes precedence over the binding value. That's why it overrides the binding.

    Here's a full dependency property listing: http://msdn.microsoft.com/en-us/library/ms743230.aspx

提交回复
热议问题