Condividi tramite


How to Embed Silverlight Content in Almost Any Web Page

Catherine Heller has written up a great post that describes a new feature in Silverlight Streaming. Having uploaded a Silverlight application to the Silverlight Streaming service, you can now embed it in any web page as an <iframe>.

If you want to include a cool Silverlight gadget on your blog, but your blog engine doesn't support custom scripts or XAML files, this will work well. It's also perfect for a social networking site like Facebook, since you can create an application that hosts an <iframe>.

Here's a little example that demonstrates this:

All it took to embed this was one element:

 <iframe src="https://silverlight.services.live.com/invoke/32/SlLogo/iframe.html" 
        frameborder="0" width="258" height="100" scrolling="no" />

Of course, you're welcome to steal this one-liner to add some Silverlight "bling" to your own site :-)

In the next post, I'll walk through a step-by-step guide to uploading an Expression Blend project to Silverlight Streaming.

Comments

  • Anonymous
    July 31, 2007
    PingBack from http://blogs.msdn.com/tims/archive/2007/07/31/iframe-support-in-silverlight-streaming.aspx

  • Anonymous
    July 31, 2007
    Tim Sneath からです。 How to Embed Silverlight Content in Almost Any Web Page Silverlight を作成した後、それを直接 Web

  • Anonymous
    July 31, 2007
    Tim great little snippet to help us get a little Silverlight love on our blogs.  Maybe we can get a transparent one so that it doesn't look so bad on non-white blogs :). As I pointed out in my post http://www.brockett.net/?p=204 it's all about getting Silverlight down to the client machine and "blog bling" and small little web apps is a great way to spread the platform.

  • Anonymous
    July 31, 2007
    You've been kicked (a good thing) - Trackback from DotNetKicks.com

  • Anonymous
    July 31, 2007
    The comment has been removed

  • Anonymous
    August 01, 2007
    The comment has been removed

  • Anonymous
    August 01, 2007
    i have plugged in Homer Simpson as Silverlight in weblogs.asp.net page. You need all scripts inline and the xaml as text/xaml script

  • Anonymous
    August 03, 2007
    The comment has been removed

  • Anonymous
    August 08, 2007
    I'm having problems getting this to work in my WordPress blog. I'm guessing it's because WordPress parses iFrames incorrectly but I'm not entirely sure. You can read more about it here: http://blog.pinkandyellow.com/silverlight/silverlight-posting-test-20070808/ If anyone has any more luck than me doing this I'd much appreciate the help. mor10

  • Anonymous
    August 08, 2007
    Please disregard my earlier comment. Turns out the reason why the code above doesn't work in WordPress is because WordPress needs a proper close to the <iframe> command. If you try the shorthand /> WordPress will insert an </iframe> right after the src call leaving the rest of the code out in the cold. This causes massive problems. lesson learned.

  • Anonymous
    August 13, 2007
    So does this mean I can't just include a script from another domain?

  • Anonymous
    August 17, 2007
    Very cool.  We are super excited about silverlight at Triggit. Can't wait to see all the cool stuff people build

  • Anonymous
    August 30, 2007
    Tim Sneath : How to Embed Silverlight Content in Almost Any Web Page &lt;iframe src="http://silverlight.services.live.com/invoke/32/SlLogo/iframe.html"

  • Anonymous
    August 30, 2007
    以前 Tim Sneath のブログ で紹介されていましたが、Windows Live の Silverlight Streaming サービス を利用すると、通常の HTML に iframe を使ってSiverlight

  • Anonymous
    August 30, 2007
    以前 Tim Sneath のブログ で紹介されていましたが、Windows Live の Silverlight Streaming サービス を利用すると、通常の HTML に iframe を使ってSiverlight

  • Anonymous
    September 04, 2007
    さて RIA 展開の柱 Flash に .NET , VS 側からアプローチする Microsoft Silverlight 1.0 Final のアナウンスが...

  • Anonymous
    September 13, 2007
    This is quite handy when trying to embed silverlight in a site when having no access to code, etc. For using this in your normal website isn't very efficient. Wherefore we created a .NET control for use in our own sites. See here: http://web-snippets.blogspot.com/2007/09/embedding-silverlight-using-net-control.html

  • Anonymous
    September 30, 2007
    via Tim Sneath: How to Embed Silverlight Content in Almost Any Web Page

  • Anonymous
    October 12, 2007
    Over at Remy's space he's posted a collection of screenshots of the Silverlight applications being delivered

  • Anonymous
    December 12, 2007
    &#160; This is a simple, and completely unofficial, inventory of many cool Silverlight applications...

  • Anonymous
    December 12, 2007
    This is a simple, and completely unofficial, inventory of many cool Silverlight applications that use...

  • Anonymous
    December 12, 2007
    This is a simple, and completely unofficial, inventory of many cool Silverlight applications that use...

  • Anonymous
    December 12, 2007
    This is a simple, and completely unofficial, inventory of many cool Silverlight applications that use...

  • Anonymous
    August 20, 2008
    I have been meaning to start video blogging (vlogging) for some time. I think you can get stuff across

  • Anonymous
    February 09, 2009
    1.http://blogs.msdn.com/tims/archive/2007/07/31/iframe-support-in-silverlight-streaming.aspx