All docs
V21.1
21.2 (EAP/Beta)
21.1
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

UICommand(Object, Object, ICommand<CancelEventArgs>, Boolean, Boolean, Object, Boolean, Dock, DialogButtonAlignment) Constructor

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

Namespace: DevExpress.Mvvm

Assembly: DevExpress.Mvvm.v21.1.dll

Declaration

public UICommand(
    object id,
    object caption,
    ICommand<CancelEventArgs> command,
    bool isDefault,
    bool isCancel,
    object tag = null,
    bool allowCloseWindow = true,
    Dock placement = Dock.Right,
    DialogButtonAlignment alignment = 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 DevExpress.Mvvm.ICommand<CancelEventArgs>

A command to invoke when the dialog button is clicked. This value is assigned to the UICommand.Command property. Set the CancelEventArgs.Cancel property to true to cancel the operation.

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