Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Using Silverlight Message Boxes with Icons - Error, Info, Confirm, Text, and Combo Input

0.00/5 (No votes)
24 Feb 2011 1  
Tutorial of easy to use Silverlight message boxes hosted on CodePlex.
If you ever tried to make custom Silverlight message boxes that look cooler and more presentable than the default message box support that ships with Silverlight, you know what a hassle it is. Below I will give you a tutorial of how to use Simple but Cool Silverlight Message Boxes to add production quality message boxes to your Silverlight application.

Step-by-Step Instructions: How to Integrate with an Existing Project

Please follow the below steps to correctly utilize the Silverlight Message Boxes in your project:

  1. Download the .DLL library file from Releases.
  2. Once saved on a local computer, right click on the .DLL file and select properties. Here click on Unblock option.
  3. Now at your Silverlight project, right click on references and select Add Reference
  4. Go to the Browse tab, and locate the downloaded and unblocked .DLL file.
  5. Once the library file was successfully referenced in the project, put using SilverlightMessageBoxLibrary; statement on top of each class where the message boxes will be used.
  6. Follow the code samples at Example Code for further instructions.

//Info Message.
Message.InfoMessage("Hello! I am here to help you!");

//Error Message.
Message.ErrorMessage("Darn! Something went wrong.");

//Confirmation with handlers.
CustomMessage confirmMessage = new CustomMessage("Do you like me?", CustomMessage.MessageType.Confirm);

confirmMessage.OKButton.Click += (obj, args) =>
{
    Message.InfoMessage("Thanks. You make me blush.");
};

confirmMessage.Show();

For more example code, please see the code section for the control.

Example Screenshot:



License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here