Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Prism+MEF: using TreeView through Prism & MEF Framework

$
0
0
Hi,

I want to apologize for the late response to your question. I´ve been investigating how to accomplish the scenario you are asking about.

As commented in the StackOverflow discussion related to this same problem (Unable to build Hierarchical View Models using MEF), you would need to register the ViewModel classes in the container, taking into account if the ViewModel needs to be registered as Singleton or not. In order to do this you would use Export attributes.

In addition, constructors would be imported from the container when instances are resolved. Therefore any argument of the constructors should be imported from the container as well. And this feature would need to perform some changes on the solution you provided. For example, the Region list parameter may need to be registered in the container, inside a RegionList class that contains te list. I will come back to you when I manage to resolve those dependencies.

The Prism Guide may be helpful for finding the way on configuring the MefBootstrapper and register the object types on it.

Regards.
Gabriel Ostrowsky
https://blogs.southworks.net/gostrowsky

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>