Page view counter
Dialog simulation HELP
Last post 09-04-2008 11:35 AM by kwatts. 3 replies.
Sort Posts:
09-04-2008 10:45 AM
Dialog simulation HELP

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?

caperaven

Loading...
Joined on 06-02-2006
Posts 105
09-04-2008 11:00 AM
Marked as Answer
Re: Dialog simulation HELP

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 


http://kenwatts.blogspot.com/


Please select "Mark as Answer" for posts that are helpful. Thanks!

kwatts

Loading...
Joined on 08-18-2008
Belchertown, MA
Posts 436
09-04-2008 11:18 AM
Re: Re: Dialog simulation HELP

Jaaa, that puts a real damper on things.

Thanks dude. In short i guess they say, :p can't be done buddy.

caperaven

Loading...
Joined on 06-02-2006
Posts 105
09-04-2008 11:35 AM
Re: Re: Dialog simulation HELP

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!

-Ken

 


http://kenwatts.blogspot.com/


Please select "Mark as Answer" for posts that are helpful. Thanks!

kwatts

Loading...
Joined on 08-18-2008
Belchertown, MA
Posts 436
Microsoft Communities