Instructions: Click the "Full Screen Toogle" button and close the resulting messagebox a few times and then... poof! (you might want to bookmark the page first :-)
Here is the code to reproduce the bug:
using System.Windows;
using System.Windows.Controls;
namespace Silverlight.Fullscreen.Bug
{
public partial class MainPage : UserControl
{
private bool firstClick = true;
public MainPage()
{
InitializeComponent();
}
private void button1_Click(object sender, RoutedEventArgs e)
{
if (firstClick)
{
//this firstclick logic is just a convienence so that you don't get a message box the first time the page opens
//it is NOT need to reproduce the bug...
image1.SizeChanged += Image_SizeChanged;
firstClick = false;
}
Application.Current.Host.Content.IsFullScreen = !Application.Current.Host.Content.IsFullScreen;
}
private void Image_SizeChanged(object sender, SizeChangedEventArgs sizeChangedEventArgs)
{
MessageBox.Show("Image_SizeChanged");
}
}
}
UPDATE: This bug appears to be Windows specific. I can't reproduce it on a Mac...

No comments:
Post a Comment