Skip to main content
All docs
V24.1

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

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

Namespace: DevExpress.Mvvm

Assembly: DevExpress.Mvvm.v24.1.dll

NuGet Packages: DevExpress.Mvvm, DevExpress.Win.Navigation

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,
    AsyncDisplayMode asyncDisplayMode = AsyncDisplayMode.None,
    object glyph = null,
    GlyphAlignment glyphAlignment = GlyphAlignment.Left
)

Parameters

Name Type Description
id Object

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

caption Object

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

command ICommand

The 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 it is the default button; otherwise, false. This value is assigned to the UICommand.IsDefault property.

isCancel Boolean

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

Optional Parameters

Name Type Default Description
tag Object null

The 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 Right

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

alignment DialogButtonAlignment Right

The dialog button’s alignment. This value is assigned to the UICommand.Alignment property.

asyncDisplayMode AsyncDisplayMode None

Specifies how the dialog button indicates an asynchronous operation. This value is assigned to the UICommand.AsyncDisplayMode property.

glyph Object null

An image displayed in the dialog button. This value is assigned to the UICommand.Glyph property.

glyphAlignment GlyphAlignment Left

The dialog button’s image alignment. This value is assigned to the UICommand.GlyphAlignment property.

See Also