IDesignerSafeUserPromptService Interface
Enables the display of prompts intended for user interaction and/or notification that can be safely used in all designer-related contexts.
public interface IDesignerSafeUserPromptService
Remarks
For internal use only.
Methods
AddOwnerProvider(IUserPromptOwnerProvider)
Adds a IUserPromptOwnerProvider to the service.
void AddOwnerProvider(IUserPromptOwnerProvider ownerProvider)
Parameter | Type | Description |
---|---|---|
ownerProvider | IUserPromptOwnerProvider | The instance of IUserPromptOwnerProvider to be added to the service. |
See Also
BuildOpenFilePrompt()
Creates a new model which can be used to prompt the user to open a file.
IDesignerSafeOpenFilePromptBuilder BuildOpenFilePrompt()
Returns
See Also
BuildSaveFilePrompt()
Creates a new model which can be used to prompt the user to save a file.
IDesignerSafeSaveFilePromptBuilder BuildSaveFilePrompt()
Returns
See Also
RemoveOwnerProvider(IUserPromptOwnerProvider)
Removes a IUserPromptOwnerProvider from the service.
void RemoveOwnerProvider(IUserPromptOwnerProvider ownerProvider)
Parameter | Type | Description |
---|---|---|
ownerProvider | IUserPromptOwnerProvider | The instance of IUserPromptOwnerProvider to be removed from the service. |
See Also
ShowError(Exception)
Displays the specified exception and information about the exception, typically in a message box.
void ShowError(Exception ex)
Parameter | Type | Description |
---|---|---|
ex | Exception | The Exception to display. |
See Also
ShowError(Exception, string)
Displays the specified exception and information about the exception, typically in a message box.
void ShowError(Exception ex, string message)
Parameter | Type | Description |
---|---|---|
ex | Exception | The Exception to display. |
message | string | A message to display that provides information about the exception. |
See Also
ShowError(string)
Displays the specified error message, typically in a message box.
void ShowError(string message)
Parameter | Type | Description |
---|---|---|
message | string | The error message to display. |
See Also
ShowFileOpenAsync(IOpenFileOptions)
Displays a dialog prompting the user to open a file.
Task<IOpenFileResult> ShowFileOpenAsync(IOpenFileOptions options)
Parameter | Type | Description |
---|---|---|
options | IOpenFileOptions | The options defining the characteristics of the file prompt. |
Returns
- Task<IOpenFileResult>:
A task which completes when the prompt is closed and whose result will be one of the DialogResult values indicating the result code of the user's interaction.
See Also
ShowFileOpenAsync(IOpenFileOptions, Action<IOpenFileResult>)
Displays a dialog prompting the user to open a file.
void ShowFileOpenAsync(IOpenFileOptions options, Action<IOpenFileResult> handler)
Parameter | Type | Description |
---|---|---|
options | IOpenFileOptions | The options defining the characteristics of the file prompt. |
handler | Action<IOpenFileResult> | The action that will be called to handle the response. |
See Also
ShowFileSaveAsync(ISaveFileOptions)
Displays a dialog prompting the user to save a file.
Task<ISaveFileResult> ShowFileSaveAsync(ISaveFileOptions options)
Parameter | Type | Description |
---|---|---|
options | ISaveFileOptions | The options defining the characteristics of the file prompt. |
Returns
- Task<ISaveFileResult>:
A task which completes when the prompt is closed and whose result will be one of the DialogResult values indicating the result code of the user's interaction.
See Also
ShowFileSaveAsync(ISaveFileOptions, Action<ISaveFileResult>)
Displays a dialog prompting the user to save a file.
void ShowFileSaveAsync(ISaveFileOptions options, Action<ISaveFileResult> handler)
Parameter | Type | Description |
---|---|---|
options | ISaveFileOptions | The options defining the characteristics of the file prompt. |
handler | Action<ISaveFileResult> | The action that will be called to handle the response. |
See Also
ShowMessage(string)
Displays the specified message, typically in a message box.
void ShowMessage(string message)
Parameter | Type | Description |
---|---|---|
message | string | The message to display. |
See Also
ShowMessage(string, string)
Displays the specified message, typically in a message box.
void ShowMessage(string message, string caption)
Parameter | Type | Description |
---|---|---|
message | string | The message to display. |
caption | string | The caption, typically for a message box. |
See Also
ShowMessageBoxAsync(string, string, MessageBoxButtons)
Displays the specified message in a message box with the specified caption and buttons to place on the dialog box.
Task<DialogResult> ShowMessageBoxAsync(string message, string caption, MessageBoxButtons buttons)
Parameter | Type | Description |
---|---|---|
message | string | The message to display. |
caption | string | The caption for the dialog box. |
buttons | MessageBoxButtons | The buttons to be displayed. |
Returns
- Task<DialogResult>:
A task which completes when the message is closed and whose result will be one of the DialogResult values indicating the result code of the user's interaction.
See Also
ShowMessageBoxAsync(string, string, MessageBoxButtons, Action<DialogResult>)
Displays the specified message in a message box with the specified caption and buttons to place on the dialog box.
void ShowMessageBoxAsync(string message, string caption, MessageBoxButtons buttons, Action<DialogResult> handler)
Parameter | Type | Description |
---|---|---|
message | string | The message to display. |
caption | string | The caption for the dialog box. |
buttons | MessageBoxButtons | The buttons to be displayed. |
handler | Action<DialogResult> | The action that will be called to handle the response. |
See Also
ShowMessageBoxAsync(string, string, MessageBoxButtons, MessageBoxIcon)
Displays the specified message in a message box with the specified caption and buttons to place on the dialog box.
Task<DialogResult> ShowMessageBoxAsync(string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
Parameter | Type | Description |
---|---|---|
message | string | The message to display. |
caption | string | The caption for the dialog box. |
buttons | MessageBoxButtons | The buttons to be displayed. |
icon | MessageBoxIcon | The icon to be displayed. |
Returns
- Task<DialogResult>:
A task which completes when the message is closed and whose result will be one of the DialogResult values indicating the result code of the user's interaction.
See Also
ShowMessageBoxAsync(string, string, MessageBoxButtons, MessageBoxIcon, Action<DialogResult>)
Displays the specified message in a message box with the specified caption and buttons to place on the dialog box.
void ShowMessageBoxAsync(string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, Action<DialogResult> handler)
Parameter | Type | Description |
---|---|---|
message | string | The message to display. |
caption | string | The caption for the dialog box. |
buttons | MessageBoxButtons | The buttons to be displayed. |
icon | MessageBoxIcon | The icon to be displayed. |
handler | Action<DialogResult> | The action that will be called to handle the response. |
See Also
ShowMessageBoxAsync(string, string, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton)
Displays the specified message in a message box with the specified caption and buttons to place on the dialog box.
Task<DialogResult> ShowMessageBoxAsync(string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
Parameter | Type | Description |
---|---|---|
message | string | The message to display. |
caption | string | The caption for the dialog box. |
buttons | MessageBoxButtons | The buttons to be displayed. |
icon | MessageBoxIcon | The icon to be displayed. |
defaultButton | MessageBoxDefaultButton | The default button for the message box. |
Returns
- Task<DialogResult>:
A task which completes when the message is closed and whose result will be one of the DialogResult values indicating the result code of the user's interaction.
See Also
ShowMessageBoxAsync(string, string, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, Action<DialogResult>)
Displays the specified message in a message box with the specified caption and buttons to place on the dialog box.
void ShowMessageBoxAsync(string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, Action<DialogResult> handler)
Parameter | Type | Description |
---|---|---|
message | string | The message to display. |
caption | string | The caption for the dialog box. |
buttons | MessageBoxButtons | The buttons to be displayed. |
icon | MessageBoxIcon | The icon to be displayed. |
defaultButton | MessageBoxDefaultButton | The default button for the message box. |
handler | Action<DialogResult> | The action that will be called to handle the response. |
See Also
ShowWarning(string)
Displays the specified message as a warning, typically in a message box.
void ShowWarning(string message)
Parameter | Type | Description |
---|---|---|
message | string | The message to display. |
See Also
ShowWarning(string, string)
Displays the specified message as a warning, typically in a message box.
void ShowWarning(string message, string caption)
Parameter | Type | Description |
---|---|---|
message | string | The message to display. |
caption | string | The caption, typically for a message box. |