ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Framework Namespace / RelayCommand Class / RelayCommand Constructor / RelayCommand Constructor(Action,Func<Boolean>,Boolean,Boolean)
The method to call.
The method to call to update the state.
Is the command automatically called for a state update. Default is true.
Is the command automatically disabled when the main worker thread is busy. Default is true.

In This Topic
    RelayCommand Constructor(Action,Func<Boolean>,Boolean,Boolean)
    In This Topic
    Instantiates a new RelayCommand instance.
    Syntax
    Public Function New( _
       ByVal execute As Action, _
       ByVal canExecute As Func(Of Boolean), _
       Optional ByVal supportsOnUpdate As Boolean, _
       Optional ByVal disableWhenBusy As Boolean _
    )

    Parameters

    execute
    The method to call.
    canExecute
    The method to call to update the state.
    supportsOnUpdate
    Is the command automatically called for a state update. Default is true.
    disableWhenBusy
    Is the command automatically disabled when the main worker thread is busy. Default is true.
    Remarks
    Use this constructor to specify a specific enabling logic (canExecute) function for the command.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also