Skip to main content
Home Forums Silverlight Programming Report a Silverlight Bug embedding a Silverlight application
5 replies. Latest Post by Hdabossxy on November 6, 2009.
(0)
shooloom
Member
60 points
26 Posts
07-25-2007 11:03 PM |
Hi, I'm trying to embed my Silverlight application in other web sites using <object> tag.
<object type="application/ag-plugin" id="SilverlightControl" width="100%" height="100%"><param name="source" value="http://www.yourdomain.com/MyPage.xaml"/><param name="windowless" value="true"/><param name="initParams" value="create_xy=random,scrapbin=Scrap_iPhone.xml"/><param name="enableHtmlAccess" value="true"/></object>
I tried something like shown in the above, but it gaves me nothing but a Silverlight control with white background.
It tried locally as shown in the below, and it works fine.
<object type="application/ag-plugin" id="SilverlightControl" width="100%" height="100%"><param name="source" value="MyPage.xaml"/><param name="windowless" value="true"/><param name="initParams" value="create_xy=random,scrapbin=Scrap_iPhone.xml"/><param name="enableHtmlAccess" value="true"/></object>
It seems to me that <param name="source" value="..."/> tag does not accept fully qualified domain name.
Is this a bug?
Pirashan...
14 points
15 Posts
08-01-2007 9:11 AM |
Hello,
There is a nice post about embedding silverlight application with almost any web page in the opening page of this website.
Try to use <iframe> to embed any silverlight application in your web pages.
<iframe src="path of your SL page" scrolling="no" width="specify the width of your SL app" height="height of your SL app" >
hope this helps.
Regards,
Pirashanthan A
08-21-2007 1:31 PM |
<iframe> is not a good way to distribute Silverlight applications because many websites does not allow you to use <iframe> due to security concerns.
Microsoft must provide a way to use <object> or <embed> tag to embed Silverlight applications just like what Adobe Flash does.
Pipnaintez
6 points
10 Posts
12-09-2008 7:25 PM |
shooloom: <iframe> is not a good way to distribute Silverlight applications because many websites does not allow you to use <iframe> due to security concerns. Microsoft must provide a way to use <object> or <embed> tag to embed Silverlight applications just like what Adobe Flash does.
I agree. I am looking for information on not using iframe and am comming up empty handed. Very disappointing.
12-09-2008 7:30 PM |
I did not realize this thread is so old. I am still unable to find a way to do this.
<object data="data:application/x-silverlight-2" type="application/x-silverlight-2" width="320" height="240"> <param name="source" value="http://diversnetwork.net/embedvideo/VideoPlayer.xap"/> <param name="background" value="black" /> <param name="enableHtmlAccess" value="true" /> <param name="initParams" value="cc=true,m=http://www.diversnetwork.net/media/videos/divesites/Chippewa/ManMade_Chippewa_med_clip1.wmv" /> <a href="http://go.microsoft.com/fwlink/?LinkID=115261" style="text-decoration: none;"> <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/> </a> </object>
Works fine if I run it from a html file in localhost under IIS. It shows up as a blank silverlight control if I post it to a html enabled forum or blog. the .xap file is still an externally hosted silverlight app hosted on my website. Why would it work from localhost on my machine and not from another website?
Any way to make this work without an iframe?
Hdabossxy
2 points
1 Posts
11-06-2009 11:44 AM |
Have you found a way to solve this issue? I got the same project and i'm getting crazy now! Even with Silverlight 3!