Trying to emulate SL5 MessageBox

3 posts, 0 answers
  1. Rob Ainscough
    Rob Ainscough avatar
    172 posts
    Member since:
    Jan 2010

    Posted 06 Sep 2012 Link to this post

    Does Telerik have support for a SL5 like MessageBox ... needs to be synchronous and work just like the SL5 MessageBox (execution stops until input is made on the messagebox) ... but needs to look better (i.e. ability to make it look integrated into my application)?

    Hoping for a simple solution, what I've read so far consists of 1000's of lines of code/xaml to implement a simple MessageBox (which isn't progress IMHO).

    Thanks, Rob.
  2. Rob Ainscough
    Rob Ainscough avatar
    172 posts
    Member since:
    Jan 2010

    Posted 06 Sep 2012 Link to this post

    So I tried out the RadWindow as the documentation says it "Modal" ... well it's not really modal.

    It looks like a ChildWindow running asynch requiring a call back to an OnClosed method.  It does NOT act like a true MessageBox where execution stops until a response is made.  So I'm not sure how this could work or why anyone would want to use it?

    For example: in a _Deleting event I need to set the e.Cancel = True or False based on whether or not a user confirms the Delete action ... there is NO WAY RadWindow can be used in this _Deleting event.  RadWindow.Confirm() doesn't stop execution in the _Deleting event, it acts just like any other ChildWindow.  So it would be impossible for me to set e.Cancel.

    Asynchronous operations are NOT Modal by definition so I have no idea why Telerik are trying to sell this "Modal" when it isn't??

    Rob.
  3. DevCraft banner
  4. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 11 Sep 2012 Link to this post

    Hi Rob,

    The modal dialogs in Silverlight are not really modal - they block the UI, but not the thread. To achieve the wanted behavior of a modal Window you will need to hook-up to the Closed event and execute the logic you want to be executed after closing the dialog box in the event handler. We implemented the dialogs in this way because Silverlight does not allow us to block the UI thread. MessageBox is using a special browser notification window which is not part of Silverlight.

    You could find more about the Alert, Prompt and Confirm methods here.

    Greetings,
    Vladi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top