With IE9 RTW, in a Silverlight 4.0 control, MessageBox.Show is not displaying a message box at all. No errors are being reported to the DOM -- the call to the Show method just doesn't work. This is only occurring when I've configured my test site to be in the Internet zone -- if the site's in theIntranet zone, the message box displays properly. The message box also displays just fine in IE8, Firefox, and Chrome.
I can repro w/ a simple test project:
Silverlight control host div:
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="library/ClientBin/IE9MsgBoxTest.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.50826.0" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.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>
MainPage.xaml:
<UserControl x:Class="IE9MsgBoxTest.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="124,100,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" /> </Grid></UserControl>
MainPage.xaml.cs:
using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Windows;using System.Windows.Controls;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Animation;using System.Windows.Shapes;namespace IE9MsgBoxTest
{ public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); } private void button1_Click(object sender, RoutedEventArgs e) { MessageBox.Show("Test Me!"); } }
}
Is anyone else seeing this issue? Are there any security settings that can we can set to work around the issue? Thanks!
-Steve