moonlightdock
moonlightdock

Reputation: 1358

Embed one silverlight application in another silverlight application

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

Upvotes: 0

Views: 332

Answers (2)

KeithMahoney
KeithMahoney

Reputation: 3343

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.

Upvotes: 1

Maciek
Maciek

Reputation: 19893

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

Upvotes: 2

Related Questions