michael
michael

Reputation: 15282

Prism - WPF/Silverlight view-model reuse

Is it possible to reuse my models/view-models that I create in a separate assembly using Prism?

Upvotes: 1

Views: 216

Answers (1)

iCollect.it Ltd
iCollect.it Ltd

Reputation: 93561

Yes. Models and view-models in modules are after all just C# class in DLLs.

The only requirement is that they be loaded before you try to use them :) If you use MEF that load happens automagically, else just ensure your module catalog specifies the right load order.

*Note: this does assume you are using Unity to register and create your Models and View-Models, otherwise you might as well share a static library of Models and View-Models with all your modules but link it only to the one of the early loaded modules.

Upvotes: 2

Related Questions