Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Dialog simulation HELP
3 replies. Latest Post by kwatts on September 4, 2008.
(0)
caperaven
Member
133 points
107 Posts
09-04-2008 10:45 AM |
Ok, i got this very nice form stuff working in silverlight and now I am developing a simple message dialog system also for our business application.
What i would like to happen is that when you call for example "MessageBox.Show("Message")" the code does not continue on the calling method until you click ok on the silverlight control that shows the message.
Example:if (some condition){
MessageBox.Show("Ooops");DoSomething();
}
now MessageBox.Show creates a user control that displays the message.but I don't want the code DoSomething() to execute until you click on a "OK" button on the ui displaying the message.
How can I put the system in a loop that will prevent the code on continueing with out locking the UI thread?
kwatts
Contributor
2129 points
436 Posts
09-04-2008 11:00 AM |
You need to use a modal dialog to accomplish this, and these are not currently available in Silverlight. There are solutions that others have developed though which seem to get around this issue. Check this link:
http://blogs.msdn.com/devdave/archive/2008/06/08/using-popup-to-create-a-dialog-class.aspx
There's a whole thread that explores this issue here:
http://silverlight.net/forums/p/16831/55929.aspx
I hope that this helps! If this answers your question, please mark it as such. Thanks!
-Ken
09-04-2008 11:18 AM |
Jaaa, that puts a real damper on things.
Thanks dude. In short i guess they say, :p can't be done buddy.
09-04-2008 11:35 AM |
I'm not sure why modal support isn't there yet. But I think some of these workarounds could work for you. If I come accross a better solution, I'll post it here.
Good luck!