MessageBoxServiceExtensions.ShowAsync(IMessageBoxService, String, String, MessageButton, Nullable<MessageResult>, Nullable<MessageResult>) Method
In This Article
Shows a message box with specified parameters.
Namespace: DevExpress.Mvvm
Assembly: DevExpress.WinUI.Mvvm.v23.2.dll
NuGet Package: DevExpress.WinUI
#Declaration
public static Task<MessageResult> ShowAsync(
this IMessageBoxService service,
string content,
string title,
MessageButton buttons = MessageButton.OK,
MessageResult? defaultResult = null,
MessageResult? cancelResult = null
)
#Parameters
Name | Type | Description |
---|---|---|
service | IMessage |
|
content | String | The text shown within the message box. |
title | String | The title of the message box. |
#Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
buttons | Message |
OK | The set of buttons shown within the message box. |
default |
Nullable<Message |
null | Specifies which message box button is default. A default button is highlighted when a message box is shown. |
cancel |
Nullable<Message |
null | Specifies which message box button is the cancel button. The cancel button’s command is invoked when a user presses the Esc key while the Message |
#Returns
Type | Description |
---|---|
Task<Message |
The task that includes the button that the user clicked. |
See Also