Answer 4
There is still an issue here, though, even if you take the issue of defining a custom UserControl out of the picture.
I have a DependencyProperty A that is bound to DependencyProperty B. B has a coercion function, as described above. In my case this has to do with a custom object that implements IScrollInfo, and the coercion ensures that B isn't outside the bounds of the scrollable area.
Anything that directly uses B gets the coerced value. However, A gets the base value rather than the coerced value. This is a serious problem for me. Of course, B shouldn't know anything about who has bound to it, so I don't have any acceptable way to force A to update itself again once it gets the new bound (base) value from B.
Is this simply a bug in the DependencyProperty code? Presumably the intent should be that if A is bound to B then A will equal B after the binding has been resolved, even if the value of B has to be coerced.
Thanks,
David Cater