19
Let's imagine I have some user control. The user control has some child windows. And user control user wants to close child windows of some type. There is a method in user control code behind:
public void CloseChildWindows(ChildWindowType type)
{
...
}
But I can't call this method as I don't have direct access to the view.
Another solution I think about is to somehow expose user control ViewModel as one of its properties (so I can bind it and give command directly to ViewModel). But I don't want user control users to know anything about user control ViewModel.
So what is the right way to solve this problem?