A long time ago to do a messagebox, the original link: http://www.cnblogs.com/DoNetCoder/p/3843658.html.
But there are some flaws in the comparison MessageBox. These days there is time to update:
1. Several new show methods are overloaded, and the official MessageBox is comparable.
2. Remove the Minimize button (I think the minimized button is simply superfluous)
3. The form height can vary with the content (if it exceeds the height of the screen there is no way)
4. Support for the icon of the message box
5. Message box pop-up support
Support for 6.ESC and enter shortcut keys
7. Several switches have been added:
/// <summary> ///whether to allow form animation/// </summary> Public Static BOOLisanimationenabled {Get; Set; } /// <summary> ///whether to allow blur effects/// <remarks>valid only if the setting owner is not empty</remarks> /// </summary> Public Static BOOLisblureffectenabled {Get; Set; } /// <summary> ///whether to play a sound when a message box pops up/// </summary> Public Static BOOLisbeepenabled {Get; Set; }
Don't worry, you just have to add a ' Z ' to the front of the MessageBox to: Zmessagebox, the other is exactly the same.
Last Picture:
SOURCE Download: Source download
Links: Zhoumy Blog
WPF: Perfect for customizing Meaagsebox 2.0