Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RichEditMenuItemSimpleCommand.ForceExecute(ICommandUIState) Method

Performs a command action regardless of a command state.

Namespace: DevExpress.XtraRichEdit.Commands

Assembly: DevExpress.RichEdit.v24.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

#Declaration

public override 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);
}
See Also