Joe
Joe

Reputation: 111

Silverlight 3 - PRISM - Retrieve and Load Module Definitions using WCF - Possible?

We are starting to use Silverlight 3 and PRISM and are successful to load modules by reading from a XAML file. However, I would like to be able to read those definitions from a database table using a WCF call.

I have the WCF call returning data, however WCF is called asynchronously and I cannot get this to work using any of the standard thread synchronization.

Any ideas??

Upvotes: 2

Views: 712

Answers (1)

Joe
Joe

Reputation: 111

This was answered by another individual on the Microsoft forums and it worked very well. Here is the solution.

-You can make a service call in you App.xaml.cs in the Application_Startup.

-Then create a parameter that will keep a list of objects received from the database in your bootstrapper.

-On the completed event of your service call, that you called from Application_Startup, set the list of objects in your bootstrapper and then call the bootstrapper.Run.

-In you GetModuleCatalog you can then build up a new ModuleCatalog.

Upvotes: 5

Related Questions