Telerik blogs

Hello folks. I am sure all of us are enjoying with Telerik’s good looking and reach theming mechanism for WinForms. But in every application there is a need for user interaction and very often it uses some type of question or message to guide the user what he is supposed to do.  

I am sure that you have used the default WinForms MessageBox class and its Show method. The standard appearance of this message box, however, does not fit nicely in the slick design of an application built with RadControls for WinForms, and I know how boring it is to implement your own dialog with matching appearance.

Not anymore! In our latest Q3 2008 version we have a new class – RadMessageBox. It offers a static Show method similar to MessageBox.Show, which means no learning curve, but it inherits Telerik’s RadForm for WinForms which gives it full support for our theming mechanism. Of course that not all - RadMessageBox supports many options, like:

  • Auto-sizing - The RadMessageBox determines its size according to the message text, title and button numbers;
  • Various button layouts - You could choose from the same standard button layouts coming from .Net MessageBox class;
  • Localization through its own localization provider;
  • Right-to-left layouts;
  • Copy to clipboard by using the Ctrl+C command.

As you see, with the help of RadMessageBox you can easily create and display prompt dialogs, status information, error messages etc. We provide standard icons for each situation, but you can replace them with something custom, if needs demand it.

Code and pictures speak for themselves, so here they are:

RadMessageBox.SetThemeName("Desert");

RadMessageBox.Show("Theme Desert", "Title", MessageBoxButtons.OK, RadMessageIcon.Info, MessageBoxDefaultButton.Button1);

 RadMessageBox form

You can find more info on the topic in our help section:

http://www.telerik.com/help/winforms/radmessageboxoverview.html


About the Author

Nikolay Diyanov

Diyanov is the Product Manager of the Native Mobile UI division at Progress. Delivering outstanding solutions that make developers' lives easier is his passion and the biggest reward in his work. In his spare time, Nikolay enjoys travelling around the world, hiking, sun-bathing and kite-surfing.

Find him on Twitter @n_diyanov or on LinkedIn.

Related Posts

Comments

Comments are disabled in preview mode.