Show / Hide Table of Contents

Class MessageBox

Displays a message box.

Inheritance
System.Object
MessageBox
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public static class MessageBox

Properties

| Improve this Doc View Source

INTERNAL_CodeToShowTheMessageBoxWithTitleAndButtons

Intended to be called by the Simulator to inject the code to display a MessageBox with a title and button.

Declaration
public static Func<string, string, bool, bool> INTERNAL_CodeToShowTheMessageBoxWithTitleAndButtons { set; }
Property Value
Type Description
System.Func<System.String, System.String, System.Boolean, System.Boolean>

Methods

| Improve this Doc View Source

Show(String)

Displays a message box that contains the specified text and an OK button.

Declaration
public static MessageBoxResult Show(string msg)
Parameters
Type Name Description
System.String msg

A System.String that specifies the text to display.

Returns
Type Description
MessageBoxResult

System.Windows.MessageBoxResult.OK in all cases.

| Improve this Doc View Source

Show(String, String)

Displays a message box that contains the specified text, title bar caption, and response buttons.

Declaration
public static MessageBoxResult Show(string messageBoxText, string caption)
Parameters
Type Name Description
System.String messageBoxText

The message to display.

System.String caption

The title of the message box.

Returns
Type Description
MessageBoxResult

System.Windows.MessageBoxResult.OK in all cases.

| Improve this Doc View Source

Show(String, String, MessageBoxButton)

Displays a message box that contains the specified text, title bar caption, and response buttons.

Declaration
public static MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button)
Parameters
Type Name Description
System.String messageBoxText

The message to display.

System.String caption

The title of the message box.

MessageBoxButton button

A value that indicates the button or buttons to display.

Returns
Type Description
MessageBoxResult

A value that indicates the user's response to the message.

| Improve this Doc View Source

Show(String, MessageBoxButton)

Displays a message box that contains the specified text, title bar caption, and response buttons.

Declaration
public static MessageBoxResult Show(string messageBoxText, MessageBoxButton button)
Parameters
Type Name Description
System.String messageBoxText

The message to display.

MessageBoxButton button

A value that indicates the button or buttons to display.

Returns
Type Description
MessageBoxResult

A value that indicates the user's response to the message.

| Improve this Doc View Source

Show(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.

Declaration
[NotImplemented]
public static MessageBoxResult Show(Window owner, string msg)
Parameters
Type Name Description
Window owner

A window reference that represents the top-level window that will own the modal dialog box.

System.String msg

The message to display.

Returns
Type Description
MessageBoxResult

OK in all cases.

  • Improve this Doc
  • View Source