This project is read-only.

Ease of Integration

The code was designed to be simple and easy to integrate. While developing Line of Business applications, the internal workings of a message box should be the last concern for the developer. For input and confirmation message boxes, the user should attach a handler to the CustomMessage objects. But otherwise, for simple messages such as Info and Error, the user can use the methods in the Message class.

Example Code:

See below examples code for using the provided messages. Please don't forget to put a using SilverlightMessageBoxLibrary;  statement, if you have followed the instructions on how to install the .DLL file


Info Message

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


Error Message

//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.");



Text Input

//Text input message with handler.
CustomMessage inputMessage = new CustomMessage("Please enter the name of your favorite singer?", CustomMessage.MessageType.TextInput);

inputMessage.OKButton.Click += (obj, args) =>
    Message.InfoMessage("Thanks for your input: " + inputMessage.Input);



Combo Input


String[] comboOptions = new String[] {"Boston Celtics", "L.A. Lakers", "Chicago Bulls", "Philadelphia 76ers"};

CustomMessage customMessage 
    = new CustomMessage("Please choose your favorite basketball team.", 
customMessage.OKButton.Click += (obj, args) =>
     //Check to see that an option was selected.
     if(customMessage.Input  != null)
        //Display the selected message.
        Message.InfoMessage("Go " + customMessage.Input + "!");

         Message.InfoMessage("No input was received.");



Last edited Jan 27, 2011 at 4:20 PM by zkhalapyan, version 14


bizzel74 Jan 15, 2014 at 9:36 AM 
When hitting the Message code I get the problem: ...
Could not load file or assembly 'System.Windows.Controls, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

khashimoto Aug 2, 2013 at 9:17 AM 
I had a good experience.

sozturk88 Jan 2, 2013 at 11:11 AM 
thank you
it is cool :)

klken Mar 30, 2012 at 6:22 AM 
For VB:

Dim inputMessage As New SilverlightMessageBoxLibrary.CustomMessage("Please reconfirm your password.", SilverlightMessageBoxLibrary.CustomMessage.MessageType.TextInput)

Private Sub cmdUpdatePassword_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
AddHandler inputMessage.OKButton.Click, AddressOf SilverlightMessageBoxLibrary_OKClick

End Sub

Private Sub SilverlightMessageBoxLibrary_OKClick(ByVal sender As Object, ByVal e As EventArgs)
End Sub

sathishsingam Aug 23, 2011 at 7:11 AM 
Can you give an example of text input using vb? I'm having trouble with the event handler. Please help me

humbird May 14, 2011 at 8:56 PM 
Can you give an example of text input using vb? I'm having trouble with the event handler.