Skip to main content

Microsoft Silverlight

Unanswered Question embedding a Silverlight applicationRSS Feed

(0)

shooloom
shooloom

Member

Member

60 points

26 Posts

embedding a Silverlight application

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?

Pirashanthan Arasaratnam
Pirashan...

Member

Member

14 points

15 Posts

Re: embedding a Silverlight application

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

 

shooloom
shooloom

Member

Member

60 points

26 Posts

Re: embedding a Silverlight application

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

Member

Member

6 points

10 Posts

Re: embedding a Silverlight application

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.Super Angry

Pipnaintez
Pipnaintez

Member

Member

6 points

10 Posts

Re: embedding a Silverlight application

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
Hdabossxy

Member

Member

2 points

1 Posts

Re: Re: embedding a Silverlight application

Have you found a way to solve this issue? I got the same project and i'm getting crazy now! Even with Silverlight 3!

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities