.NET Blog

Tony Cavaliere

 
My Favourite Albums
  And the Grappa wins.
E-mail me Send mail

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 2012

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 (3) | Post RSSRSS comment feed

Related posts

Comments

dog carseat us

Monday, November 16, 2009 1:44 AM

dog carseat

Well this is very interesting indeed.Would love to read a little more of this. Great post. Thanks for the heads-up�This blog was very informative and knowledgeable



Regards
Natl

discount bags US

Thursday, May 27, 2010 2:35 PM

discount bags

I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people.

louis vuitton bags US

Tuesday, June 01, 2010 4:34 PM

louis vuitton bags

Comfortabl y, the article is in reality the best on this valuable topic. I harmonise with your conclusions and will thirstily look forward to your coming updates. Just saying thanks will not just be sufficient, for the wonderful clarity in your writing. I will instantly grab your rss feed to stay privy of any updates. Fabulous work and much success in your business dealings!