This is a migrated thread and some comments may be shown as answers.

RadMessageBox - Error when Opening Multiple Instances

3 Answers 75 Views
MessageBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jon
Top achievements
Rank 1
Jon asked on 18 Dec 2013, 07:41 PM
I've just tried integrating the RadMessageBox into my WP8 app.

Like all Windows Phone apps, my app is heavily asynchronous, and data being constantly pulled from the server.  Various returns from the server launch the RadMessageBox.

If a RadMessageBox is opened while a previous RadMessageBox is still open my app crashed with the error message "ExceptionObject = {System.InvalidOperationException: A message box is already open.
   at Telerik.Windows.Controls.RadMessageBox.ShowAsync(Object title, MessageBoxButtons buttons, Object message, Object checkBoxContent, Boolean isCheckBoxChecked, Boolean vibrate, H"

Can I really only have one RadMessageBox open at a time, or am I doing something wrong?

My method looks like this:

public async void showDialog(string Title, string Message)
    {
        RadMessageBox.ShowAsync(Title, MessageBoxButtons.OK, Message);
    }



Previously I was using the MessagePrompt from the Coding4Fun toolkit for this exact same purpose without any problems.



3 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 19 Dec 2013, 08:07 AM
Hi Jon,

Thanks for writing.
Currently this is by design. RadMessageBox can be open only once. We have plans to extend it with a custom dialog that can display multiple messages if many message boxes are open but it is not available yet.

Please write again if you have other questions.

Regards,
Victor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Jon
Top achievements
Rank 1
answered on 19 Dec 2013, 11:12 PM
If that's the case then that should be clearly stated in the documentation, as per the RadWindows "gotchas" page (http://www.telerik.com/help/windows-phone/gotchas.html).

I note that the RadMessageBox overview page in the documentation is also out of date, making reference to the deprecated Show method instead of the new ShowAsync method.
0
Victor
Telerik team
answered on 20 Dec 2013, 07:26 AM
Hello Jon,

The exception thrown from RadMessageBox is quite descriptive. An InvalidOperationException that explains why the operation is invalid is a clear sign of designed behavior.

Thanks for pointing out that the help references the old API. We will update it shortly.

Regards,
Victor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
MessageBox
Asked by
Jon
Top achievements
Rank 1
Answers by
Victor
Telerik team
Jon
Top achievements
Rank 1
Share this question
or