I have this super simple Silverlight 5 app hosted in an ASP page. The code looks like this:
SilverlightApplicationWindowlessFF.aspx
<body style="background-color:Gray";> Hello <form id="form1" runat="server" style="height:500px; width:500px;"> <div id="silverlightControlHost" style="background-color:Black; height:500px; width:500px;"> <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="400px" height="400px"> <param name="source" value="ClientBin/SilverlightApplicationWindowlessFF.xap"/> <param name="onError" value="onSilverlightError" /> <param name="background" value="black" /> <param name="minRuntimeVersion" value="5.0.61118.0" /> <param name="autoUpgrade" value="true" /> <param name="windowless" value="true" /> <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="text-decoration:none"> <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/> </a> </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div> </form> </body> SilverlightApplicationWindowlessFF MainPage.xaml:
<UserControl x:Class="SilverlightApplicationWindowlessFF.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"> <Grid x:Name="LayoutRoot" Background="White"> <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="221,50,0,0" Name="button1" VerticalAlignment="Top" Width="75" /> </Grid> </UserControl> My problem is it doesn't display correctly. The Silverlight object is there (right-clickable with the default SL context menu), but it's empty, the MainPage.xaml contents are not displayed at all. Everything is OK in Chrome and IE, but not in Firofox. I noticed, that if I remove this line:
<param name="windowless" value="true" /> everything is just fine, the app displays correctly. The point is I need the 'windowless' parameter for another app, and just trying to fix it on a simplest possible example. It's just a fresh SL5 project (hosting in ASP) with a Button and the windowless parameter added. Somebody help me please.
No comments:
Post a Comment
Send us your comment related to the topic mentioned on the blog