ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Framework Namespace / State Class / Activate Method
The state string identifier.
Example Version

Activate Method (State)
Adds the specified state to the state set.
Syntax
public void Activate( 
   string stateID
)

Parameters

stateID
The state string identifier.
Example
Activate/Deactivate a state - to modify a condition
// Define the condition in the DAML file based on the state 
if (activate)
  FrameworkApplication.State.Activate("someState");
else
  FrameworkApplication.State.Deactivate("someState");
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also