Replies: 2 comments
-
Generally speaking you are correct that Prism's ViewModelLocationProvider is architected to return the ViewModel type for a given View. It's also in the name it is after all the ViewModelLocationProvider not the ViewLocationProvider. That said Prism.Maui introduced some changes which are currently in the Prism.Core with the IViewRegistry which transitions the |
Beta Was this translation helpful? Give feedback.
-
You can do VM first in Prism for WPF but I would never recommend it. Never use data templates as your primary view location/rendering strategy |
Beta Was this translation helpful? Give feedback.
-
1- I used to use Caliburn Micro's ViewLocator for a VM-first approach, and I was wondering if there's an equivalent with Prism (because if I understand correctly, the ViewModelLocator is a typical ViewFirst approach) ?
2- Should I use datatemplates and Prism.Unity for a VM-First approach and avoid ViewModelLocator? Are there any out-of-the-box ways of doing this?
3- Or more specifically an approach like the "ViewConnectionModel" proposed here: https://www.codeproject.com/Tips/5294830/WPF-with-PRISM-View-and-ViewModel-First-Implementa ?
or DevExpress ViewLocator: https://docs.devexpress.com/WPF/17470/mvvm-framework/viewlocator
Many thanks
Beta Was this translation helpful? Give feedback.
All reactions