开发者

wpf mvvm custom control - call an action on the control

I've got a custom control that I'm using on a View in my MVVM Prism project - we've completely decoupled it so that the ViewModel does not have any access to the View.

From a command handler on my ViewModel I want to call a method on my Customer Control.

Whats the best way to hook it up?

开发者_如何学Go

Thanks,

Andy


See if you can bind a property of the control to a property on the VM and register for the change of the control's property in the Control itself. That way you do not have to know the method of the Control in the VM.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜