[This is preliminary documentation and is subject to change.]

Displays a message box in front of the specified window. The message box displays a message, title bar caption, button, and icon; and accepts a default message box result and returns a result.

Namespace: Tools.WindowsT.IndependentT
Assembly: Tools.Windows (in Tools.Windows.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public static MessageBoxResult Show(
	Window owner,
	string messageBoxText,
	string caption,
	MessageBoxButton button,
	MessageBoxImage icon,
	MessageBoxResult defaultResult
)
Visual Basic
<EditorBrowsableAttribute(EditorBrowsableState.Never)> _
Public Shared Function Show ( _
	owner As Window, _
	messageBoxText As String, _
	caption As String, _
	button As MessageBoxButton, _
	icon As MessageBoxImage, _
	defaultResult As MessageBoxResult _
) As MessageBoxResult
Visual C++
[EditorBrowsableAttribute(EditorBrowsableState::Never)]
public:
static MessageBoxResult Show(
	Window^ owner, 
	String^ messageBoxText, 
	String^ caption, 
	MessageBoxButton button, 
	MessageBoxImage icon, 
	MessageBoxResult defaultResult
)
F#
[<EditorBrowsableAttribute(EditorBrowsableState.Never)>]
static member Show : 
        owner:Window * 
        messageBoxText:string * 
        caption:string * 
        button:MessageBoxButton * 
        icon:MessageBoxImage * 
        defaultResult:MessageBoxResult -> MessageBoxResult 
JScript
public static function Show(
	owner : Window, 
	messageBoxText : String, 
	caption : String, 
	button : MessageBoxButton, 
	icon : MessageBoxImage, 
	defaultResult : MessageBoxResult
) : MessageBoxResult

Parameters

owner
Type: System.Windows..::..Window
A Window that represents the owner window of the message box.
messageBoxText
Type: System..::..String
A String that specifies the text to display.
caption
Type: System..::..String
A String that specifies the title bar caption to display.
button
Type: System.Windows..::..MessageBoxButton
A MessageBoxButton value that specifies which button or buttons to display.
icon
Type: System.Windows..::..MessageBoxImage
A MessageBoxImage value that specifies the icon to display.
defaultResult
Type: System.Windows..::..MessageBoxResult
A MessageBoxResult value that specifies the default result of the message box.

Return Value

A MessageBoxResult value that specifies which message box button is clicked by the user.

Remarks

This function is provided mainly for compatibility with MessageBox. You'd bete use overload which's icon parameter is MessageBox..::..MessageBoxIcons. See ConvertIconConstant(MessageBoxIcon) for explanation.

Exceptions

ExceptionCondition
System.ComponentModel..::..InvalidEnumArgumentExceptionbutton is not member of MessageBoxButton =or= options is not valid MessageBoxOptions value =or = icon is not member of MessageBoxImage
System.Reflection..::..TargetInvocationExceptionThere was an error working working with customized static properties such as DefaultImplementation or message box implementation failed.

See Also