Back to API Home

The MessageBox type exposes the following members.

Constructors

  NameDescription
Public methodMessageBox
Initializes a new instance of the MessageBox class. ** DO NOT USE **.

Methods

  NameDescription
Public methodClose(DialogResult)
Closes the dialog box.
(Inherited from Dialog.)
Public methodClose(DialogResult, IDictionary)
Closes the dialog box.
(Inherited from Dialog.)
Public methodEnsureVisible
Positions the dialog so that at least some of the header is in view. Otherwise it may be possible for the user to place the dialog somewhere unreachable.
(Inherited from Dialog.)
Public methodHideLoadingOverlay
Hides any visible loading overlay over the dialog.
(Inherited from Dialog.)
Public methodOnApplyTemplate
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate()()()().
(Overrides Dialog..::..OnApplyTemplate()()()().)
Public methodShow()()()()
Shows the dialog modally.
(Inherited from Dialog.)
Public methodShow(Boolean)
Shows the dialog.
(Inherited from Dialog.)
Public methodStatic memberShowAsync(String, String)
Shows a message box with no icon and an OK button.
Public methodStatic memberShowAsync(String, String, MessageBoxIcon)
Shows a message box with the with an OK button.
Public methodStatic memberShowAsync(String, String, MessageBoxResultCallback)
Shows a message box with no icon and an OK button.
Public methodStatic memberShowAsync(String, String, MessageBoxIcon, MessageBoxButtons)
Shows a message box, with the first button as the default button.
Public methodStatic memberShowAsync(String, String, MessageBoxIcon, MessageBoxResultCallback)
Shows a message box with the with an OK button.
Public methodStatic memberShowAsync(String, String, MessageBoxIcon, MessageBoxButtons, MessageBoxDefaultButton)
Shows a message box.
Public methodStatic memberShowAsync(String, String, MessageBoxIcon, MessageBoxButtons, MessageBoxResultCallback)
Shows a message box, with the first button as the default button.
Public methodStatic memberShowAsync(String, String, MessageBoxIcon, MessageBoxButtons, MessageBoxDefaultButton, MessageBoxResultCallback)
Shows a message box.
Public methodStatic memberShowAsync(String, String, MessageBoxIcon, IEnumerable<(Of <<'(Command>)>>), Command, MessageBoxResultCallback)
Shows a message box.
Public methodStatic memberShowAsync(String, String, MessageBoxIcon, MessageBoxButtons, MessageBoxDefaultButton, Boolean, MessageBoxResultCallback)
Shows a message box.
Public methodShowLoadingOverlay()()()()
Shows the loading overlay.
(Inherited from Dialog.)
Public methodShowLoadingOverlay(String)
Shows the loading overlay with a specified message.
(Inherited from Dialog.)

Fields

  NameDescription
Public fieldStatic memberButtonsProperty
Declares the Buttons property.
Public fieldStatic memberDefaultButtonProperty
Declares the DefaultButton property.
Public fieldStatic memberDefaultCommandProperty
Declares the DefaultCommand property.
Public fieldStatic memberIconProperty
Declares the Icon property.
Public fieldStatic memberMessageProperty
Declares the Message property.

Properties

  NameDescription
Public propertyButtons
Gets or sets the buttons shown by the MessageBox.
Public propertyCancelOnEscape
Gets or sets a value indicating whether the dialog should be closed (with a Cancel result) when the user presses the Escape key.
(Inherited from Dialog.)
Public propertyCommands
Gets or sets the commands.
(Inherited from Dialog.)
Public propertyDefaultButton
Gets or sets the default button selected by the MessageBox.
Public propertyDefaultCommand
Gets or sets the default command selected by the MessageBox.
Public propertyDialogButtons
Gets or sets a value indicating which buttons will be shown in the dialog.
(Inherited from Dialog.)
Public propertyDialogButtonStyle
Gets or sets the dialog button style. This is a dependency property.
(Inherited from Dialog.)
Public propertyHeaderBackground
Gets or sets the Dialog header background.
(Inherited from Dialog.)
Public propertyHeaderMargin
Gets or sets the Dialog header margin.
(Inherited from Dialog.)
Public propertyHeaderVisibility
Gets or sets the header visibility.
(Inherited from Dialog.)
Public propertyIcon
Gets or sets the Icon for the MessageBox.
Public propertyInitialPosition
Gets or sets the initial position at which the dialog will be displayed.
(Inherited from Dialog.)
Public propertyIsModal
Gets a value indicating whether the dialog is shown modally.
(Inherited from Dialog.)
Public propertyIsShowing
Gets a value indicating whether this dialog is currently open.
(Inherited from Dialog.)
Public propertyIsShowingLoadingOverlay
Gets a value indicating whether the loading overlay is being shown.
(Inherited from Dialog.)
Public propertyIsUserResizable
Gets or sets a value indicating whether the user is allowed to resize the dialog by clicking and dragging on the border.
(Inherited from Dialog.)
Public propertyMessage
Gets or sets the Message for the MessageBox.
Public propertyPreviouslyFocusedControl
Gets or sets the previously focused control.
(Inherited from Dialog.)
Public propertyShowCloseButton
Gets or sets a value indicating whether to show the dialog's close button.
(Inherited from Dialog.)
Public propertyTitle
Gets or sets the dialog's title.
(Inherited from Dialog.)
Public propertyTitleColor
Gets or sets the brush used for the title text.
(Inherited from Dialog.)
Public propertyTitleFontFamily
Gets or sets the FontFamily for the dialog title.
(Inherited from Dialog.)
Public propertyTitleFontSize
Gets or sets the FontSize for the dialog title.
(Inherited from Dialog.)
Public propertyTitleFontStretch
Gets or sets the FontStretch for the dialog title.
(Inherited from Dialog.)
Public propertyTitleFontStyle
Gets or sets the FontStyle for the dialog title.
(Inherited from Dialog.)
Public propertyTitleFontWeight
Gets or sets the FontWeight for the dialog title.
(Inherited from Dialog.)
Public propertyTitleMargin
Gets or sets the dialog title margin.
(Inherited from Dialog.)

Events

  NameDescription
Public eventClosed
Event that occurs once the dialog has closed.
(Inherited from Dialog.)
Public eventClosing
Event that occurs when the user has tried to close the dialog. This can be used to prevent the dialog from closing (for example, prompting the user to save changes).
(Inherited from Dialog.)
Public eventOpened
Event that occurs when the dialog has opened and is now visible.
(Inherited from Dialog.)
Public eventOpening
Event that occurs when the dialog is positioned and ready to show itself.
(Inherited from Dialog.)

See Also