Command.ForceExecute(ICommandUIState) Method

Performs a command action regardless of a command state.

Namespace: DevExpress.Utils.Commands

Assembly: DevExpress.Data.v19.2.dll

Declaration

public abstract void ForceExecute(
    ICommandUIState state
)
Public MustOverride Sub ForceExecute(
    state As ICommandUIState
)

Parameters

Name Type Description
state ICommandUIState

An ICommandUIState interface defining the command state.

Remarks

The following code snippet illustrates the typical use of the ForceExecute method.


using DevExpress.Utils.Commands;
// ...
ICommandUIState state = cmd.CreateDefaultCommandUIState();
cmd.UpdateUIState(state);
// check command state 
if (state.Enabled)
{
    cmd.ForceExecute(state);
}
See Also