Class CustomMessageBox
Displays a message box.
Inheritance
Inherited Members
Namespace: Phoenix.Controls
Assembly: Phoenix.Controls.dll
Syntax
public static class CustomMessageBox
Methods
View SourceShow(String, String, MessageBoxButton, MessageBoxImage, MessageBoxResult, String)
Displays a message box that has a message, title bar caption, button, and icon; and that returns a result.
Declaration
public static CustomMessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.None, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageBoxText | A System.String that specifies the text to display. |
System.String | caption | A System.String that specifies the title bar caption to display. |
System.Windows.MessageBoxButton | button | A System.Windows.MessageBoxButton value that specifies which button or buttons to display. |
System.Windows.MessageBoxImage | icon | A System.Windows.MessageBoxImage value that specifies the icon to display. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |
Show(String, String, MessageBoxButton, MessageBoxResult, String)
Displays a message box that has a message, title bar caption, and button; and that returns a result.
Declaration
public static CustomMessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.None, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageBoxText | A System.String that specifies the text to display. |
System.String | caption | A System.String that specifies the title bar caption to display. |
System.Windows.MessageBoxButton | button | A System.Windows.MessageBoxButton value that specifies which button or buttons to display. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |
Show(String, String, MessageBoxResult, String)
Displays a message box that has a message and a title bar caption; and that returns a result.
Declaration
public static CustomMessageBoxResult Show(string messageBoxText, string caption, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.None, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageBoxText | A System.String that specifies the text to display. |
System.String | caption | A System.String that specifies the title bar caption to display. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |
Show(String, MessageBoxResult, String)
Displays a message box that has a message and returns a result.
Declaration
public static CustomMessageBoxResult Show(string messageBoxText, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.None, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageBoxText | A System.String that specifies the text to display. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |
Show(Window, String, String, MessageBoxResult, 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.
Declaration
public static CustomMessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.None, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Window | owner | A System.Windows.Window that represents the owner window of the message box. |
System.String | messageBoxText | A System.String that specifies the text to display. |
System.String | caption | A System.String that specifies the title bar caption to display. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |
Show(Window, String, MessageBoxResult, String)
Displays a message box in front of the specified window. The message box displays a message and returns a result.
Declaration
public static CustomMessageBoxResult Show(Window owner, string messageBoxText, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.None, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Window | owner | A System.Windows.Window that represents the owner window of the message box. |
System.String | messageBoxText | A System.String that specifies the text to display. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |
ShowOK(String, String, String, MessageBoxImage, MessageBoxResult, String)
Displays a message box that has a message, title bar caption, OK button with a custom System.String value for the button's text, and icon; and that returns a result.
Declaration
public static CustomMessageBoxResult ShowOK(string messageBoxText, string caption, string okButtonText, MessageBoxImage icon, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.None, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageBoxText | A System.String that specifies the text to display. |
System.String | caption | A System.String that specifies the title bar caption to display. |
System.String | okButtonText | A System.String that specifies the text to display within the OK button. |
System.Windows.MessageBoxImage | icon | A System.Windows.MessageBoxImage value that specifies the icon to display. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |
ShowOK(String, String, MessageBoxResult, String)
Displays a message box that has a message, title bar caption, and OK button with a custom System.String value for the button's text; and that returns a result.
Declaration
public static CustomMessageBoxResult ShowOK(string messageBoxText, string caption, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.None, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageBoxText | A System.String that specifies the text to display. |
System.String | caption | A System.String that specifies the title bar caption to display. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |
ShowOKCancel(String, String, String, String, MessageBoxImage, MessageBoxResult, String)
Displays a message box that has a message, caption, OK/Cancel buttons with custom System.String values for the buttons' text, and icon; and that returns a result.
Declaration
public static CustomMessageBoxResult ShowOKCancel(string messageBoxText, string caption, string okButtonText, string cancelButtonText, MessageBoxImage icon, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.None, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageBoxText | A System.String that specifies the text to display. |
System.String | caption | A System.String that specifies the title bar caption to display. |
System.String | okButtonText | A System.String that specifies the text to display within the OK button. |
System.String | cancelButtonText | A System.String that specifies the text to display within the Cancel button. |
System.Windows.MessageBoxImage | icon | A System.Windows.MessageBoxImage value that specifies the icon to display. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |
ShowOKCancel(String, String, String, String, MessageBoxResult, String)
Displays a message box that has a message, caption, and OK/Cancel buttons with custom System.String values for the buttons' text; and that returns a result.
Declaration
public static CustomMessageBoxResult ShowOKCancel(string messageBoxText, string caption, string okButtonText, string cancelButtonText, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.None, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageBoxText | A System.String that specifies the text to display. |
System.String | caption | A System.String that specifies the title bar caption to display. |
System.String | okButtonText | A System.String that specifies the text to display within the OK button. |
System.String | cancelButtonText | A System.String that specifies the text to display within the Cancel button. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |
ShowYesNo(String, String, String, String, MessageBoxImage, MessageBoxResult, String)
Displays a message box that has a message, caption, Yes/No buttons with custom System.String values for the buttons' text, and icon; and that returns a result.
Declaration
public static CustomMessageBoxResult ShowYesNo(string messageBoxText, string caption, string yesButtonText, string noButtonText, MessageBoxImage icon, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.No, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageBoxText | A System.String that specifies the text to display. |
System.String | caption | A System.String that specifies the title bar caption to display. |
System.String | yesButtonText | A System.String that specifies the text to display within the Yes button. |
System.String | noButtonText | A System.String that specifies the text to display within the No button. |
System.Windows.MessageBoxImage | icon | A System.Windows.MessageBoxImage value that specifies the icon to display. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |
ShowYesNo(String, String, String, String, MessageBoxResult, String)
Displays a message box that has a message, caption, and Yes/No buttons with custom System.String values for the buttons' text; and that returns a result.
Declaration
public static CustomMessageBoxResult ShowYesNo(string messageBoxText, string caption, string yesButtonText, string noButtonText, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.No, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageBoxText | A System.String that specifies the text to display. |
System.String | caption | A System.String that specifies the title bar caption to display. |
System.String | yesButtonText | A System.String that specifies the text to display within the Yes button. |
System.String | noButtonText | A System.String that specifies the text to display within the No button. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |
ShowYesNoCancel(String, String, String, String, String, MessageBoxImage, MessageBoxResult, String)
Displays a message box that has a message, caption, Yes/No/Cancel buttons with custom System.String values for the buttons' text, and icon; and that returns a result.
Declaration
public static CustomMessageBoxResult ShowYesNoCancel(string messageBoxText, string caption, string yesButtonText, string noButtonText, string cancelButtonText, MessageBoxImage icon, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.No, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageBoxText | A System.String that specifies the text to display. |
System.String | caption | A System.String that specifies the title bar caption to display. |
System.String | yesButtonText | A System.String that specifies the text to display within the Yes button. |
System.String | noButtonText | A System.String that specifies the text to display within the No button. |
System.String | cancelButtonText | A System.String that specifies the text to display within the Cancel button. |
System.Windows.MessageBoxImage | icon | A System.Windows.MessageBoxImage value that specifies the icon to display. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |
ShowYesNoCancel(String, String, String, String, String, MessageBoxResult, String)
Displays a message box that has a message, caption, and Yes/No/Cancel buttons with custom System.String values for the buttons' text; and that returns a result.
Declaration
public static CustomMessageBoxResult ShowYesNoCancel(string messageBoxText, string caption, string yesButtonText, string noButtonText, string cancelButtonText, MessageBoxResult defaultMessageBoxResult = MessageBoxResult.Cancel, string checkBoxMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageBoxText | A System.String that specifies the text to display. |
System.String | caption | A System.String that specifies the title bar caption to display. |
System.String | yesButtonText | A System.String that specifies the text to display within the Yes button. |
System.String | noButtonText | A System.String that specifies the text to display within the No button. |
System.String | cancelButtonText | A System.String that specifies the text to display within the Cancel button. |
System.Windows.MessageBoxResult | defaultMessageBoxResult | The default dialog result when the window is closed through the window's cancel x button. If it's MessageBoxResult.None, the close event will be cancelled. |
System.String | checkBoxMessage | Message to display next to checkbox - if no message is present, checkbox will not be displayed. |
Returns
Type | Description |
---|---|
CustomMessageBoxResult | A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. |