Skip to main content

Command.CreateDefaultCommandUIState() Method

Creates an object defining the command state for the current command.

Namespace: DevExpress.Utils.Commands

Assembly: DevExpress.Data.v24.1.dll

NuGet Package: DevExpress.Data

Declaration

public virtual ICommandUIState CreateDefaultCommandUIState()

Returns

Type Description
ICommandUIState

An ICommandUIState interface that defines the command state.

Remarks

Use the CreateDefaultCommandUIState method to create an object that exposes the ICommandUIState interface for a particular command. You can use the created object to obtain the current command state by calling the Command.UpdateUIState method. Then, you can check the command state and modify it if necessary, and call the Command.ForceExecute method to perform the action specified by the command.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CreateDefaultCommandUIState() 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