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?
开发者_如何学GoThanks,
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.
精彩评论