Skip to main content

MessageBoxCommand.Create(MessageButton, IMessageButtonLocalizer, Nullable<MessageResult>, Nullable<MessageResult>) Method

Creates a list of MessageBoxCommands with specified settings.

Namespace: DevExpress.Mvvm

Assembly: DevExpress.WinUI.Mvvm.v23.2.dll

NuGet Package: DevExpress.WinUI

#Declaration

public static List<MessageBoxCommand> Create(
    MessageButton buttons,
    IMessageButtonLocalizer localizer,
    MessageResult? defaultButton = null,
    MessageResult? cancelButton = null
)

#Parameters

Name Type Description
buttons MessageButton

A MessageButton enum value from which a List of MessageBoxCommands is generatred.

localizer DevExpress.Mvvm.IMessageButtonLocalizer

An object that is used to get the Caption.

#Optional Parameters

Name Type Default Description
defaultButton Nullable<MessageResult> null

A button that is invoked when a user presses the Enter key.

cancelButton Nullable<MessageResult> null

A button that is invoked when a user presses the Esc key.

#Returns

Type Description
List<MessageBoxCommand>

A list of MessageBoxCommands.

See Also