Following on this question's comments, I feel obliged to ask this one.
It's an application I'm currently working on, and to avoid further issues and to keep on working with Catel (which, whatever troubles I may have with it, is really pleasant to use), I will need explanations on a few topics.
I have an API class (let's call it
API) which contains several methods to connect to some content manager and perform actions on it. It's a single class that I'd like to split into several
Model classes (for the example, two will do):
Connection: pretty self-explanatory, would contain two
DataSource: indicates where/on what in the content manager the application will be work, with one
As far as the models go, it's ok, nothing too hard. My first issue comes with the associated
ViewModels; I need to use the same instance of
API in every single of these. So for now, I use only one ViewModel, and the
UserControls associated with my
Models just inherit it from my
MainWindow (these are regular UserControls, not Catel's, else it yells at me for not having ViewModels for them).
Since Catel isn't too fond of nested viewmodels, here's my question:
How do I pass/use a parameter between various ViewModels? (or how do I separate my main ViewModel without using nested viewmodels?)