RadMessageBox - Error when Opening Multiple Instances

4 posts, 0 answers
  1. Jon
    Jon avatar
    3 posts
    Member since:
    Jun 2013

    Posted 18 Dec 2013 Link to this post

    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.



  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 19 Dec 2013 Link to this post

    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.
  3. DevCraft banner
  4. Jon
    Jon avatar
    3 posts
    Member since:
    Jun 2013

    Posted 19 Dec 2013 Link to this post

    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.
  5. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 20 Dec 2013 Link to this post

    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.
Back to Top
DevCraft banner