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 (Window, String)

Displays a message box that contains the specified text and an OK button that is modal to the window specified by the owner parameter.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

public static MessageBoxResult Show(
	Window owner,
	string messageBoxText


Type: System.Windows.Window
A window reference that represents the top-level window that will own the modal dialog box.
Type: System.String
The message to display.


messageBoxText is null.


owner is null.

This method is only applicable to trusted out-of-browser applications. If it is called in an application that does not have elevated permissions and is out-of-browser, the message box will be modal to the web-browser main window.


Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft