'm trying to open a Telerik RadWindow, but I'm having trouble tying the dialog's View to the ViewModel.
In my ViewModel I open the dialog using:
var radWindowViewModel = new MyViewModel();
var radWindow = new RadWindow
Width = 400,
Height = 150,
Content = ViewLocator.LocateForModelType(typeof(MyViewModel), null, radWindowViewModel)
The RadWindow is opened, but in it is displayed: "Cannot find view for MyNameSpace.MyViewModel.
Alternatively, when I set RadWindow.Content the following way:
Content = ViewLocator.LocateForModel(radWindowViewModel, null, null)
then I see the correct View, but the View's DataContext is never set.
Does anyone know what I'm doing wrong?