I would like to create custom window and show it without IUIvisualizerService
with Catel.
The problem is: When I create a window, bind ViewModel to it, seems like View does not react on properties changes.
I have done following:
var photo = new Photo();
NewPhotoWindow newPhotoWindow = new NewPhotoWindow();
var viewModel = new NewPhotoWindowViewModel(photo);
newPhotoWindow.DataContext = viewModel;
newPhotoWindow.ShowDialog();
Is there a way to create it via some kind of ViewLocator?
I have tried with TypeFactory
, but this does not allow me to put photo as a model for my ViewModel.
You shouldn't be manually doing the ViewModel creation in Catel. It's all done for you automatically.
This should be sufficient:
This will automatically: