Skip to main content
A newer version of this page is available.
All docs
V20.2

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

NuGet Packages: DevExpress.Mvvm, DevExpress.Uwp.Controls, DevExpress.WindowsDesktop.Mvvm

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
)

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