Is it OK to stop current thread until user click some buttons in Silverlight? E.g.

```
var clicked = false;
ShowDialog(EventOnClosed => clicked = true);
while (!clicked) {};
return;

```

P.S. I know the right way. I'm just curious if there's a way to stop and then continue Silverlight execution flow.

P.P.S. Just to be more specific. Imagine a project where javascript alert() is used for messages. How do you replace "return Invoke("alert('')")" with Silverlight messageboxes? Do you change all 500 places to use the correct async technique?