tags:

views:

115

answers:

2

Is there a way to embed one silverlight application in another silverlight application?

if so how and what are the restrictions if any?

The closest thing that I could find by searching on internet is this where a consultant suggested a method but I couldn't figure out how to get it working.

Plz help

+1  A: 

One solution would be to load second application's xaml dynamically, place it in a container and parse it at runtime - I believe it was possible in Silverlight 2, should still be do-able in Silverlight 3

Maciek
+1  A: 

What you probably want to do is to download a .xap file and then instantiate the root visual element from that .xap (e.g. "MainPage").

You will need to use WebClient to download the xap package. Then you can read that package as a stream and dynamically load the assemblies in it and instantiate a UserControl from the xap.

This blog post shows how to dynamically instantiate controls from a xap given a stream.

KeithMahoney