[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, complies with the specified options, 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.Advanced)]
public static MessageBoxResult Show(
	Window owner,
	string messageBoxText,
	string caption,
	MessageBoxButton button,
	MessageBox..::..MessageBoxIcons icon,
	MessageBoxResult defaultResult,
	MessageBoxOptions options
)
Visual Basic
<EditorBrowsableAttribute(EditorBrowsableState.Advanced)> _
Public Shared Function Show ( _
	owner As Window, _
	messageBoxText As String, _
	caption As String, _
	button As MessageBoxButton, _
	icon As MessageBox..::..MessageBoxIcons, _
	defaultResult As MessageBoxResult, _
	options As MessageBoxOptions _
) As MessageBoxResult
Visual C++
[EditorBrowsableAttribute(EditorBrowsableState::Advanced)]
public:
static MessageBoxResult Show(
	Window^ owner, 
	String^ messageBoxText, 
	String^ caption, 
	MessageBoxButton button, 
	MessageBox..::..MessageBoxIcons icon, 
	MessageBoxResult defaultResult, 
	MessageBoxOptions options
)
F#
[<EditorBrowsableAttribute(EditorBrowsableState.Advanced)>]
static member Show : 
        owner:Window * 
        messageBoxText:string * 
        caption:string * 
        button:MessageBoxButton * 
        icon:MessageBox..::..MessageBoxIcons * 
        defaultResult:MessageBoxResult * 
        options:MessageBoxOptions -> MessageBoxResult 
JScript
public static function Show(
	owner : Window, 
	messageBoxText : String, 
	caption : String, 
	button : MessageBoxButton, 
	icon : MessageBox..::..MessageBoxIcons, 
	defaultResult : MessageBoxResult, 
	options : MessageBoxOptions
) : 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: Tools.WindowsT.IndependentT..::..MessageBox..::..MessageBoxIcons
A MessageBoxImage value that specifies the icon to display. Values Asterisk, Hand, Exclamation and Question are assciated with appropriate SystemSounds.
defaultResult
Type: System.Windows..::..MessageBoxResult
A MessageBoxResult value that specifies the default result of the message box.
options
Type: System.Windows..::..MessageBoxOptions
A MessageBoxOptions value object that specifies the options.

Return Value

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

Remarks

Exceptions

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

See Also