I've just installed IE8 final and it seems there is an odd behaviour in my SL apps, which work fine with IE 7. In some of these (ASP.NET) pages I used to host a SL control which must extend all the available height in the web browser window, i.e. whose height is set to 100%, like this:
<%@ Page Title="Sample" Language="C#" MasterPageFile="~/SomeMaster.master" AutoEventWireup="true"
CodeFile="Sample.aspx.cs" Inherits="Sample" %>
<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="mainCopy" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/MyApp.xap"
MinimumVersion="2.0.31005.0" Width="100%" Height="100%" />
What happens when I browse to this page with IE8 is that the space reserved to the SL host control is about one third of the available browser page height, so that vertical scrollbars appear and the SL application is vertically "cut". If I set a fixed size (e.g. Height="480") it works, but I'd like to extend to the whole page height. How can I fix this?
You could force your page into IE7 mode if you do not want to set a fixed size
<!-- Mimic Internet Explorer 7 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>My Web Page</title>
I think that I face the same problem. When I run my Silverlight 2.0 application in IE7 it works just fine. After I installed IE8 the application is shown only at the third upper part of IE. I tried to set the height and width values hardcoded and it works but it is not a suitable solution since if the client has a different screen resolution the application looks bad and if the client uses IE8 in full screen mode (F11) then the application takes only upper part of the screen according to the height values that I defined. Does Microsoft has a solution for this problem???
From what I observed with this bug, the issue was with using * in the grid rows or columns. IE8 will take the * as 0 where as it should actually take it as maximum available space. So we need to avoid using Height="*" for grid rows and Width="*" for grid columns
i too faced the same problem, in IE 8, there is a option called "compatible View", Click that Icon it will open your silverlight application as what you except,
Still now i am hard-coding height and width of the silverlight, but its is not the good code
i think there is bug in IE 8, i dont know when the microsoft will solve this issue
if it is useful "please Mark as answer"
See if this works for you...
In your master page set the form height to 100%
<form id="form1" runat="server" style="height: 100%">
Similarly for the div enclosing the content placeholder
<div style="width: 100%; height: 100%;">
<asp:ContentPlaceHolder ID="MainPlaceholder" runat="server">