.NET Blog

Tony Cavaliere

 
My Favourite Albums
  And the Grappa wins.
E-mail me Send mail
Add to Technorati Favorites AddThis Feed Button

Subscribe to Cynot Why Not


Recent posts

Disclaimer

Hey unlike other bloggers I stand by what I say but just in case. The opinions expressed herein are my own except on Tuesday when the second card is not turned up otherwise it ain't worth squat.

© Copyright 2010

Embedding Silverlight into BlogEngine.NET

The last few weeks have been a crash course on Silverlight. I've read Introducing Microsoft Silverlight 2. I've watched most of the silverlight.net videos. A total Silevrlight immersion. I have written a number of silverlight apps mostly variations of apps I've seen at silverlight.net or from the books and postings I've read.

What about hosting Silverlight controls on my blog? Some brilliant developer out there must have already written a BlogEngine.NET extension to host silverlight and guess what there is a just an extension specially for hosting silverlight controls.

A blog posting at flawless.code details how to embed silverlight into BlogEngine.NET.

Here is a sample silverlight application hosted in this blog. This app which I call Fun with Balls is a variation of an app presented at a MIX08 session.

Guess the movie

Remind me why I do this again.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: Silverlight
Posted by CynotWhyNot on Monday, July 21, 2008 9:27 PM
Permalink | Comments (44) | Post RSSRSS comment feed

Silverlight, ASPX and Style Attributes: FireFox Issues?

This one has puzzled me for a while and still does.

The generated markup for and asp.net page used to host a Silverlight control is shown in the following listing.

<body style="height:100%;margin:0;">

    <form id="form1" runat="server" style="height:100%;">

        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

        <div  style="height:100%;">

            <asp:Silverlight ID="Xaml1" runat="server"

            Source="~/ClientBin/SilverlightApplication1.xap"

            MinimumVersion="2.0.30523" Width="100%" Height="100%" />

        </div>

    </form>

</body>

Have you ever wondered why the body, form and div tags all have their height style set to 100%. Well it turns out that if they are not set then the Silverlight control may not render properly in FireFox. I say may not as I have seen cases where it will render correctly. From what I can tell all these tags must have their style heights set to 100%.

I stumbled across this during some experimentation with a Silverlight application I wrote that mimics a MIX08 session I watch a while back. You can watch the session at silverlight.net. The app I wrote that mimics the app created during this session can be viewed at CynotWhyNot.com and the code can be downloaded here. Just take the code and remove the style attributes from the body, form and div tags and try running the app in first IE and then FireFox. It should render correctly in IE but not in FireFox.

 

Guess the movies

Great balls of fire! HICCUP! It's Rhett!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: Silverlight
Posted by CynotWhyNot on Friday, July 11, 2008 1:43 PM
Permalink | Comments (14) | Post RSSRSS comment feed

Silverlight 2.0 and MIME Types: My First gotcha

I've been playing around with Silverlight 2.0 (beta) and so far it looks great. As usual I started by writing the canonical Hello World program. It was quite simple, a TextBlock Silverlight control with it's text property set to Hello World. It worked absolutely fine on my development box. I then went and deployed the code to my hosting provider and guess what it, it didn't work.

So why didn't it work? It turns out that you need to make sure that the XAP file extension is registered and set to the application/x-silverlight-app MIME type in IIS. Check out this blog post  for additional information.

Thanks to Page Brooks for responding to my forum post on silverlight.net.

Guess the movie

Courage! What makes a king out of a slave? Courage!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: Silverlight
Posted by CynotWhyNot on Tuesday, July 01, 2008 8:07 PM
Permalink | Comments (18) | Post RSSRSS comment feed