WPF: Calling method in View from viewModel WPF: Calling method in View from viewModel wpf wpf

WPF: Calling method in View from viewModel


You might introduce an interface IView so that the ViewModel can call a method on the View. This way the ViewModel doesn’t need to know about the concrete View class and can still be unit tested.

How this can be accomplished is shown by the sample applications of the WPF Application Framework (WAF).