UICommand(Object, Object, ICommand, Boolean, Boolean, Object, Boolean, Dock, DialogButtonAlignment) Constructor

Initializes a new instance of the UICommand class with the custom settings.

Namespace: DevExpress.Mvvm

Assembly: DevExpress.Mvvm.v20.2.dll

Declaration

public UICommand(
    object id,
    object caption,
    ICommand command,
    bool isDefault,
    bool isCancel,
    object tag = null,
    bool allowCloseWindow = true,
    Dock placement = Dock.Right,
    DialogButtonAlignment alignment = DialogButtonAlignment.Right
)
Public Sub New(
    id As Object,
    caption As Object,
    command As ICommand,
    isDefault As Boolean,
    isCancel As Boolean,
    tag As Object = Nothing,
    allowCloseWindow As Boolean = True,
    placement As Dock = Dock.Right,
    alignment As DialogButtonAlignment = DialogButtonAlignment.Right
)

Parameters

Name Type Description
id Object

A dialog button identifier. This value is assigned to the UICommand.Id property.

caption Object

A text displayed within a dialog button. This value is assigned to the UICommand.Caption property.

command ICommand

A command to invoke when the dialog button is clicked. This value is assigned to the UICommand.Command property.

isDefault Boolean

true, if the button is the default button; otherwise false. This value is assigned to the UICommand.IsDefault property.

isCancel Boolean

true, if the button is the cancel button; otherwise false. This value is assigned to the UICommand.IsDefault property.

Optional Parameters

Name Type Default Description
tag Object

null

An object associated with the dialog button. This value is assigned to the UICommand.Tag property.

allowCloseWindow Boolean

True

true, if the button closes the current window; otherwise, false. This value is assigned to the UICommand.AllowCloseWindow property.

placement Dock

2

The dialog button's placement. This value is assigned to the UICommand.Placement property.

alignment DialogButtonAlignment

0

The dialog button's alignment. This value is assigned to the UICommand.Placement property.

See Also