ArcGIS Pro 2.7 API Reference Guide
RelayCommand Class
Members 

ArcGIS.Desktop.Framework Namespace : RelayCommand Class
An implementation of ICommand.
Syntax
Remarks

RelayCommands are helpful in decoupling the user interface from the logic that needs to run when a button is clicked for example.

The framework's RelayCommand implementation is special in that by default it will add the command to the application's main message pump meaning its CanExecute function will automatically be called several times a second. If you do not need this behavior, set supportsOnUpdate to false in the appropriate constructor. If you do use this behavior, make sure you Disconnect the command from the pump when your dialog closes.

RelayCommands automatically disable whenever the primary worker thread is busy. To override this behavior set disableWhenBusy to false in the appropriate constructor.

Note, RelayCommands in the message pump automatically disable once the application begins to shutdown.

Inheritance Hierarchy

System.Object
   ArcGIS.Desktop.Framework.Contracts.PropertyChangedBase
      ArcGIS.Desktop.Framework.RelayCommand

Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

RelayCommand Members
ArcGIS.Desktop.Framework Namespace