Sunday, May 27, 2007

Silverlight-enabled Blogger Template

Under the Edit Template option of the blog, there is a button to Edit HTML. Browsing that I could find the <head> tag and could insert the following snippet.

<script src='http://agappdom.net/g/silverlight.js type='text/javascript'/>
<script type='text/javascript'>
function CreateSilverlight(){Sys.Silverlight.createHostedObjectEx({source: &quot;streaming:/12905/SilverlightsOut&quot;,parentElement: SilverlightsOutWrapper});}
</script>

Note that I modified the sample code provided to include the body of the CreateSilverlight.js file because Blogger won't host js files.

Browsing the blog didn't throw any errors, so are we almost there?



Yay - I can see the application. Div size is a bit messed, and Blogger's Edit Html likes to add
tags to my javascript code ala Microsoft Frontpage but it's embedded here in Blogger, streamed.

2 comments:

Anonymous said...

---------------------------
Windows Internet Explorer
---------------------------

Silverlight error message
ErrorCode: 2251
ErrorType: ParserError
Message: AG_E_RUNTIME_MANAGED_ACTIVATION
XamlFile: page.xaml
Line: 10
Position: 1

---------------------------
OK
---------------------------

Unknown said...

GOOD

http://naizona.blogspot.com/