开发者

Dependency property based on POCO property that already notifies

I have a dependency property exposed in my control that takes its value from another object that already implements INotifyPropertyChanged.

Is there any way to tell WPF to subscribe directly to this object, or do I have to pl开发者_运维问答umb the change notifications myself?

Cheers


I'm may be unclear on your question, but you could do:

control.SetBinding(YourDependencyProperty, new Binding("YourProperty") { Source = poco });

You can also set Mode to TwoWay to pass values back to the POCO.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜