Tuesday, December 8, 2009

WPF MessageBox - Custom control (Updated with "Show Details" expander)


I updated my MessageBox control code to include a “Show Details” progressive disclosure tab to show inner exceptions or details on the message displayed. The new option can be activated by calling the overloaded Show() method as
__Result = WPFMessageBox.Show("NullReference Exception",

                        "Object reference not set to an instance of an object",

                        @"at JetBrains.ActionManagement.UpdatableAction.Update(IDataContext context) in c:\Agent\work\abf124657aeded22\Platform\src\UI\src\ActionSystem\Action\UpdatableAction.cs:line 82 at JetBrains.ActionManagement.ActionManagerBase.UpdateAction(IUpdatableAction action) in c:\Agent\work\abf124657aeded22\Platform\src\UI\src\ActionSystem\ActionManager\ActionManagerBase.cs:line 726 at JetBrains.VsIntegration.ActionManagement.VsActionManager.UpdateAction(IUpdatableAction action) in c:\Agent\work\abf124657aeded22\Platform\src\VSIntegration\src\ActionManagement\VSActionManager.cs:line 1252"

                        WPFMessageBoxButtons.OK, WPFMessageBoxImage.Error);
Screen shots:

Post a comment with your email address and I’ll email the updated source code for the message box control.
I have uploaded the source code to codeplex. You can get it from here
http://prajeeshprathap.codeplex.com/SourceControl/PatchList.aspx

33 comments:

  1. Great work! Please send the source code to borlip@dodo.com.au

    ReplyDelete
  2. Very good work! I was looking for this thing exactly. Can you please send me the src?

    Just one question: Why did you choose to implement your own enums rather than using the enums that the standard MessageBox uses, Ie: MessageBoxOptions, MessageBoxResults, MessageBoxButton, MessageBoxIcon etc. Keeping the standard enumns would make it so much easier to migrate code from the old MessageBox over to your implementation?

    Again, really good work, I cannot wait to get my hands on it!

    Cheers,
    Fredrik

    ReplyDelete
  3. Hi Fredrik,
    Could you please leave ur email Id for the source code?

    ReplyDelete
  4. Hi Prajeesh,

    Sure my email is: fredrik.peraldi@kershnerconsulting.com

    Looking forward to see the sourcecode!

    Cheers,
    Fredrik

    ReplyDelete
  5. Great implentation - I'd love to take a look at it! Can you send the code to michelle.l.smiley@gmail.com?

    ReplyDelete
  6. Very good article!
    Can I get the code at tedyusa2000@yahoo.ca ?

    P.S. Happy New Year!

    ReplyDelete
  7. very good ..... can i ask you send the src code to amin_r_amin@yahoo.com

    ReplyDelete
  8. Wow I've been looking for this kind of implementation can you send me the source code.

    The may name is jAY Gabilo and this is may email jay.gabilo@gmail.com



    Thanks

    ReplyDelete
  9. Wow this looks greate I've been looking for this kind of message box implementation. Can you send me the source code.


    jAY Gabilo
    jay.gabilo@gmail.com

    ReplyDelete
  10. Hi Prajeesh,
    This looks like what I need at the moment. Could you please send me the source code to marko@top.net.nz.

    Thanks,
    Marko

    ReplyDelete
  11. Hi Prajeesh,

    This is very good; exactly what I need. Could you please send the source code to marko@top.net.nz.

    Thanks,
    Marko

    ReplyDelete
  12. Looks like what I need. Why microsoft have not developed one is beyond me!!

    Could you please post src to brett@coomoora.com,

    thanks

    ReplyDelete
  13. Really good work, I would likely receive the source code.
    Can you please mail it to following address?
    Arrakis79@hotmail.de

    Cheers,
    Frank

    ReplyDelete
  14. hi,

    thats a good one, can you please mail me the source to jikubhai@yahoo.com ....
    thank you

    ReplyDelete
  15. Good work!

    This looks like the ticket for me, could you email me the source please?

    marcus_atkins@hotmail.com

    ReplyDelete
  16. hi, I want the source code.
    Thanks.
    My mail: trialboy@live.cn

    ReplyDelete
  17. Very good, please send source to
    pirotbus99@yahoo.com
    Thanks!!

    ReplyDelete
  18. Nice job, can you share it?
    vytazs@yahoo.com

    ReplyDelete
  19. Looks great! Can You please send me the source? Thank You.

    Greetings from Germany.
    schmidtering(at)arcor.de

    ReplyDelete
  20. Thank you for sending me the source.

    telecino@gmail.com

    ReplyDelete
  21. please send the source code to the following address. ramanpk@hotmail.com

    ReplyDelete
  22. Hi,

    Can you please send me the source code for the show detail option in message box.

    mail id - mishra.pk.bikram@gmail.com

    thanks

    ReplyDelete
  23. This comment has been removed by the author.

    ReplyDelete
  24. Great implentation - Its really Nice.I would say Great job. Can you send the code to bilalwani@gmail.com

    ReplyDelete
  25. Send the source to truxtun35 AT yahoo.com Thanks!

    ReplyDelete
  26. Hi,
    Thanks for sending me the source code.
    In your source code I pasted the overloaded show method as per your instruction. But it is giving me an error that "No overload for method 'show' takes five arguments".
    And also I searched for the key "Show Details" and found nothing.
    Can you please tell me if i have missed any steps?

    ReplyDelete
  27. Can you please send me the Source Code.

    ReplyDelete
  28. Is there another version of the code ? My copy got some "errors".

    1. Top left icon does not disapear (i'm on XP !)
    2. No option to show the "expandable" section.
    3. Window is not centered, even more it never display at the same place ?

    ReplyDelete
  29. I have uploaded the source code to codeplex. You can get it from here
    http://prajeeshprathap.codeplex.com/SourceControl/PatchList.aspx

    ReplyDelete
  30. Hey Prajeesh custom Message Box looks great. I really liked the way You have implemented it using delegates. I found a small problem though. It runs perfectly when break points are not applied but when they are applied (wanted to navigate through F11) the entire application is getting frozen. Could not find whats wrong. If u find the problem let me know. Can u send the latest source code to my mail: dineshreddy.blog@gmail.com

    Thnx

    ReplyDelete
  31. Hey Prajeesh, I just found that the owner of the message box is not set and when used on dual screen with the original window moved to other screen the message box shows up on the other screen rather than on the parent window. I just set the owner = application.current.mainwindow and it works perfect. and strangely the previously reported problem (problem with F11 navigation) is no more.

    Thnx

    ReplyDelete
  32. Hi, very cool Messagebox.
    Can you say me why the MessageBox doesn't work, if I try to run it modeless? I change the ShowDialog() methode to Show() and the Messagebox doesn't work.
    Can you give me some helb?

    Thanks Markus

    ReplyDelete
  33. Please sent the source code to this mail
    mtz_gaafar@yahoo.com
    Thanks alot !!

    ReplyDelete