The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
MessageBox.Show Method (String, String, MessageBoxButton)
Silverlight
Displays a message box that contains the specified text, title bar caption, and response buttons.
Namespace: System.Windows
Assembly: System.Windows (in System.Windows.dll)
public static MessageBoxResult Show( string messageBoxText, string caption, MessageBoxButton button )
Parameters
- messageBoxText
- Type: System.String
The message to display.
- caption
- Type: System.String
The title of the message box.
- button
- Type: System.Windows.MessageBoxButton
A value that indicates the button or buttons to display.
Return Value
Type: System.Windows.MessageBoxResultA value that indicates the user's response to the message.
| Exception | Condition |
|---|---|
| ArgumentNullException | messageBoxText is null. -or- caption is null. |
| ArgumentException | button is not a valid MessageBoxButton value. |
The message box is modal, which means that the user must click a button or press ESC to dismiss the message.
If the button parameter is OK, then the return value is OK in all cases.
If the button parameter is OKCancel, then the return value is OK only when the user has clicked the OK button. Otherwise, the return value is Cancel.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.