Page view counter
call a silverlight application from another silverlight application Subscribe to this thread
Last post 05-20-2008 11:20 PM by Yi-Lun Luo - MSFT. 5 replies.
Sort Posts:
05-19-2008 7:25 AM
call a silverlight application from another silverlight application

how can i call a silverlight application from another silverlight application.

Just like we r calling one SWF from another  SWF  in Flash.

 

shanjoseph

Loading...
Joined on 05-19-2008
Posts 3
05-19-2008 8:10 AM
Marked as Answer
Re: call a silverlight application from another silverlight application

Silverlight is a browser-based plugin.  Because of this, each Silverlight application runs within an instance of the plugin.  Each instance is basically just an HTML object element.  Because of this, if you want to call a Silverlight application from another application you must call the application through the HTML DOM. 

If you are using Silverlight 2, you can use the classes in the System.Windows.Browser namespace to help you do this from managed code.  If you are using Silverlight 1.0, you can do this using standard JavaScript. 

If this answers your question, please select "mark as answer", otherwise, please post a follow up question. Thanks!
Chad Campbell

Author of Silverlight 2.0 in Action Blog: http://cornucopia30.blogspot.com

chad.campbell

Loading...
Joined on 02-06-2007
Louisville, KY
Posts 332
05-20-2008 12:09 AM
Re: call a silverlight application from another silverlight application

 thank you  very much.

i  serached for an example of  this. but i didn't get it.

can u please help me with an example  or a  proper link. 

am using silverlight 2.0 

 

shanjoseph

Loading...
Joined on 05-19-2008
Posts 3
05-20-2008 2:00 AM
Marked as Answer
Re: call a silverlight application from another silverlight application

With in your silverlight application you can write the following code to get the HTMl elements

HtmlDocument _doc = HtmlPage.Document;

 _doc.GetElementById("ValueText").SetProperty("Value", txtName.Text);

Now the html textbox value is set from the Silverlight application.Like wise you can get the value of the HTML element inside the second silverlight pluggin. 

 

AngryYoungMan

Loading...
Joined on 05-20-2008
Posts 1
05-20-2008 2:58 AM
Re: Re: call a silverlight application from another silverlight application

 thank you very much for your answer.


suppose  we have a silverlight application and the usercontrol of this contains two canvases.

On the second canvas i want to load another silverlight application. And i also need to communicate with these two silverlight applications.

Is this  possible?

shanjoseph

Loading...
Joined on 05-19-2008
Posts 3
05-20-2008 11:20 PM
Marked as Answer
Re: Re: Re: call a silverlight application from another silverlight application
Hello, if what you mean is you want to have another Silverlight application inside a Canvas of the first one, I suggest you to use a single Silverlight application with two UserControls. You can just put another UserControl in that Canvas. This will be much easier than creating two separate Silverlight applications and handle the communication stuffs.

 

shanaolanxing - I'll transfer to the Windows Azure team, and will have limited time to participate in the Silverlight forum. Apologize if I don't answer your questions in time.

Yi-Lun Luo - MSFT

Loading...
Joined on 10-29-2007
Posts 2,747
Microsoft Communities