Skip to main content

Microsoft Silverlight

Answered Question Silverlight Widget - reference external xap file in <object> tag?RSS Feed

(0)

crowcoder
crowcoder

Member

Member

5 points

7 Posts

Silverlight Widget - reference external xap file in <object> tag?

Is it possible to give someone some <object> tag code that they can drop on any web page and NOT give them a xap file? I'd like to simplify the widget setup for my users and reference a xap file on my server.

This code was generated by a tool.

bryant
bryant

Star

Star

9937 points

1,629 Posts

Silverlight MVP

Re: Silverlight Widget - reference external xap file in <object> tag?

You could code your own ASP.NET server control that would contain the references and build the object tag for the user with all the required parameters. You could even distribute a javascript file which would do the same thing. Then just have the user add the server object or the javascript to their page (you could even host the javascript on your server along with the xap).

-- bryant

Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.

crowcoder
crowcoder

Member

Member

5 points

7 Posts

Re: Silverlight Widget - reference external xap file in <object> tag?

I can't assume they are using asp.net. I'd like anyone with an HTML file to drop my <object> code into their markup to get my widget. I guess I just have to include instructions for placing the xap file as well.

This code was generated by a tool.

bryant
bryant

Star

Star

9937 points

1,629 Posts

Silverlight MVP

Re: Silverlight Widget - reference external xap file in <object> tag?

So I'd go with the second option then, use a javascript file hosted where the xap is at. You could do something similar to WMD where you just add the js reference and create a div to host the content.

-- bryant

Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.

crowcoder
crowcoder

Member

Member

5 points

7 Posts

Re: Silverlight Widget - reference external xap file in <object> tag?

I can create an object tag dynamically easily enough, but that doesn't help me set the source parameter to another domain (and make it work). I found another post with the same issue I am having. My answer is rapidly aproaching "Can't do it".

http://silverlight.net/forums/p/45811/127683.aspx

This code was generated by a tool.

bryant
bryant

Star

Star

9937 points

1,629 Posts

Silverlight MVP
Answered Question

Re: Silverlight Widget - reference external xap file in <object> tag?

The last post in that thread has an important idea. Take a look at the live silverlight hosting. The second option is basically the same idea as what I'm suggesting. They create the control via javascript and special tag.

-- bryant

Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.

crowcoder
crowcoder

Member

Member

5 points

7 Posts

Re: Silverlight Widget - reference external xap file in <object> tag?

I don't like the IFrame idea. I will check out silverlight hosting though. Thank you very much for your time.

This code was generated by a tool.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities