Skip to main content

Command.ForceExecute(ICommandUIState) Method

Performs a command action regardless of a command state.

Namespace: DevExpress.Utils.Commands

Assembly: DevExpress.Data.v22.2.dll

NuGet Package: DevExpress.Data

Declaration

public abstract void ForceExecute(
    ICommandUIState state
)

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);
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ForceExecute(ICommandUIState) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also