Skip to main content
Home Forums Silverlight Programming Report a Silverlight Bug MessageBox crashes
2 replies. Latest Post by GearWorld on December 27, 2008.
(0)
GearWorld
Participant
840 points
1,101 Posts
12-26-2008 6:39 PM |
See this screenshot that shows you a crash on a MessageBox call, and this is RANDOMLY. I don't always get the error but after a few run, and I tried to pin point a way to reproduce it and I was unable to.
http://pages.videotron.com/gear/weird.jpg
lingbing
Contributor
2249 points
406 Posts
12-26-2008 9:05 PM |
Yes, it is a silverlight bug. This is duo to across-threading issue. Actually MessageBox.Show() method has dealed that issue, however, for some unknown reason it sometimes crashes.
When you call MessageBox.Show, if you can make sure that it is not the UI-thread, you can call Deployment.Current.Dispatcher.BeginInvoke to invoke the method call, but if you don't know that, don't use that.
And use System.Windows.Browser.HtmlPage.Window.Dispatcher.BeginInvoke is more safe, you can use that to invoke a method call. That method should be System.Windows.Browser.HtmlPage.Window.Alert/Confirm. The looking is as same as MessageBox.Show, you can have a try.
Regards!
12-27-2008 9:29 AM |
Hey Thank ya !