views:

342

answers:

1

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??

+4  A: 

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.

Joe
Mark this as the answer. ;-) Sounds good.
Anderson Imes