ThemedMessageBox Class
Defines a drop-in replacement for MessageBox that can be used to display messages with full support for the current application theme powered by UserPromptWindow.
public static class ThemedMessageBox
- Inheritance:
- System.Object Object
Methods
Show(String)
Displays a message box that has a message and that returns a result.
public static MessageBoxResult Show(string messageBoxText)
Parameter | Type | Description |
---|---|---|
messageBoxText | System.String | A System.String that specifies the text to display. |
Returns
- System.Windows.MessageBoxResult:
A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
Show(String, String)
Displays a message box that has a message and title bar caption; and that returns a result.
public static MessageBoxResult Show(string messageBoxText, string caption)
Parameter | Type | Description |
---|---|---|
messageBoxText | System.String | A System.String that specifies the text to display. |
caption | System.String | A System.String that specifies the title bar caption to display. |
Returns
- System.Windows.MessageBoxResult:
A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
Show(String, String, MessageBoxButton)
Displays a message box that has a message, title bar caption, and button; and that returns a result.
public static MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button)
Parameter | Type | Description |
---|---|---|
messageBoxText | System.String | A System.String that specifies the text to display. |
caption | System.String | A System.String that specifies the title bar caption to display. |
button | System.Windows.MessageBoxButton | A System.Windows.MessageBoxButton value that specifies which button or buttons to display. |
Returns
- System.Windows.MessageBoxResult:
A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
Show(String, String, MessageBoxButton, MessageBoxImage)
Displays a message box that has a message, title bar caption, button, and icon; and that returns a result.
public static MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon)
Parameter | Type | Description |
---|---|---|
messageBoxText | System.String | A System.String that specifies the text to display. |
caption | System.String | A System.String that specifies the title bar caption to display. |
button | System.Windows.MessageBoxButton | A System.Windows.MessageBoxButton value that specifies which button or buttons to display. |
icon | System.Windows.MessageBoxImage | A System.Windows.MessageBoxImage value that specifies the icon to display. |
Returns
- System.Windows.MessageBoxResult:
A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
Show(String, String, MessageBoxButton, MessageBoxImage, MessageBoxResult)
Displays a message box that has a message, title bar caption, button, and icon; and that accepts a default message box result and returns a result.
public static MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult)
Parameter | Type | Description |
---|---|---|
messageBoxText | System.String | A System.String that specifies the text to display. |
caption | System.String | A System.String that specifies the title bar caption to display. |
button | System.Windows.MessageBoxButton | A System.Windows.MessageBoxButton value that specifies which button or buttons to display. |
icon | System.Windows.MessageBoxImage | A System.Windows.MessageBoxImage value that specifies the icon to display. |
defaultResult | System.Windows.MessageBoxResult | A System.Windows.MessageBoxResult value that specifies the default result of the message box. |
Returns
- System.Windows.MessageBoxResult:
A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
Show(String, String, MessageBoxButton, MessageBoxImage, MessageBoxResult, Action)
Displays a message box that has a message, title bar caption, button, and icon; and that accepts a default message box result, a help action, and returns a result.
public static MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult, Action helpAction)
Parameter | Type | Description |
---|---|---|
messageBoxText | System.String | A string that specifies the text to display. |
caption | System.String | A string that specifies the title bar caption to display. |
button | System.Windows.MessageBoxButton | A System.Windows.MessageBoxButton value that specifies which button or buttons to display. |
icon | System.Windows.MessageBoxImage | A System.Windows.MessageBoxImage value that specifies the icon to display. |
defaultResult | System.Windows.MessageBoxResult | A System.Windows.MessageBoxResult value that specifies the default result of the message box. |
helpAction | System.Action | When specified, adds a 'Help' button whose command will invoke the specified System.Action. |
Returns
- System.Windows.MessageBoxResult:
A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
Show(Window, String)
Displays a message box in front of the specified window. The message box displays a message and returns a result.
public static MessageBoxResult Show(Window owner, string messageBoxText)
Parameter | Type | Description |
---|---|---|
owner | System.Windows.Window | A System.Windows.Window that represents the owner window of the message box. |
messageBoxText | System.String | A System.String that specifies the text to display. |
Returns
- System.Windows.MessageBoxResult:
A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
Show(Window, String, String)
Displays a message box in front of the specified window. The message box displays a message and title bar caption; and it returns a result.
public static MessageBoxResult Show(Window owner, string messageBoxText, string caption)
Parameter | Type | Description |
---|---|---|
owner | System.Windows.Window | A System.Windows.Window that represents the owner window of the message box. |
messageBoxText | System.String | A System.String that specifies the text to display. |
caption | System.String | A System.String that specifies the title bar caption to display. |
Returns
- System.Windows.MessageBoxResult:
A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
Show(Window, String, String, MessageBoxButton)
Displays a message box in front of the specified window. The message box displays a message, title bar caption, and button; and it also returns a result.
public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button)
Parameter | Type | Description |
---|---|---|
owner | System.Windows.Window | A System.Windows.Window that represents the owner window of the message box. |
messageBoxText | System.String | A System.String that specifies the text to display. |
caption | System.String | A System.String that specifies the title bar caption to display. |
button | System.Windows.MessageBoxButton | A System.Windows.MessageBoxButton value that specifies which button or buttons to display. |
Returns
- System.Windows.MessageBoxResult:
A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
Show(Window, String, String, MessageBoxButton, MessageBoxImage)
Displays a message box in front of the specified window. The message box displays a message, title bar caption, button, and icon; and it also returns a result.
public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon)
Parameter | Type | Description |
---|---|---|
owner | System.Windows.Window | A System.Windows.Window that represents the owner window of the message box. |
messageBoxText | System.String | A System.String that specifies the text to display. |
caption | System.String | A System.String that specifies the title bar caption to display. |
button | System.Windows.MessageBoxButton | A System.Windows.MessageBoxButton value that specifies which button or buttons to display. |
icon | System.Windows.MessageBoxImage | A System.Windows.MessageBoxImage value that specifies the icon to display. |
Returns
- System.Windows.MessageBoxResult:
A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
Show(Window, String, String, MessageBoxButton, MessageBoxImage, MessageBoxResult)
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.
public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult)
Parameter | Type | Description |
---|---|---|
owner | System.Windows.Window | A System.Windows.Window that represents the owner window of the message box. |
messageBoxText | System.String | A System.String that specifies the text to display. |
caption | System.String | A System.String that specifies the title bar caption to display. |
button | System.Windows.MessageBoxButton | A System.Windows.MessageBoxButton value that specifies which button or buttons to display. |
icon | System.Windows.MessageBoxImage | A System.Windows.MessageBoxImage value that specifies the icon to display. |
defaultResult | System.Windows.MessageBoxResult | A System.Windows.MessageBoxResult value that specifies the default result of the message box. |
Returns
- System.Windows.MessageBoxResult:
A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
Show(Window, String, String, MessageBoxButton, MessageBoxImage, MessageBoxResult, Action)
Displays a message box in front of the specified window. The message box displays a message, title bar caption, button, and icon; and that accepts a default message box result, a help action, and returns a result.
public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult, Action helpAction)
Parameter | Type | Description |
---|---|---|
owner | System.Windows.Window | A System.Windows.Window that represents the owner window of the message box. |
messageBoxText | System.String | A string that specifies the text to display. |
caption | System.String | A string that specifies the title bar caption to display. |
button | System.Windows.MessageBoxButton | A System.Windows.MessageBoxButton value that specifies which button or buttons to display. |
icon | System.Windows.MessageBoxImage | A System.Windows.MessageBoxImage value that specifies the icon to display. |
defaultResult | System.Windows.MessageBoxResult | A System.Windows.MessageBoxResult value that specifies the default result of the message box. |
helpAction | System.Action | When specified, adds a 'Help' button whose command will invoke the specified System.Action. |
Returns
- System.Windows.MessageBoxResult:
A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
Inherited Members
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()