Skip to main content
All docs
V25.1
  • dxUIACalculateAllProperties Variable

    Specify if all properties are automatically calculated for a node in the UI Automation tree.

    Declaration

    var dxUIACalculateAllProperties: Boolean = True;

    Variable Value

    Type Description
    Boolean
    True
    Recommended. All UIA node properties are calculated automatically.
    False

    Automatic UIA node property calculation is disabled. In this mode, you can define individual UI node properties as calculated in Automation.OnInitializeProperties event handlers for each target control.

    Note

    This option may be useful in certain cases when the UI Automation functionality reduces application UI responsiveness.

    Remarks

    You can set the dxUIACalculateAllProperties global variable to False if you need to disable automatic property calculation for UIA nodes associated with all supported DevExpress controls in an application.

    Calculate Only UIA Node Names for Editors

    The code example in this section demonstrates an OnInitializeProperties event handler that disables automatic calculation for UIA node properties and enables calculation only for the Name UIA property. The form’s OnCreate event handler assigns the same OnInitializeProperties event handler to TcxTextEdit, TcxButtonEdit, and TcxCheckBox editors.

    uses
      dxUIAClasses,  // Declares all UI Automation classes
      cxEdit,  // Declares base editor classes and auxiliary types
      cxTextEdit,  // Declares the TcxTextEdit class
      cxCheckBox,  // Declares the TcxCheckBox class
      cxButtonEdit;  // Declares the TcxButtonEdit class
    // ...
    
    procedure TMyForm.InitializeAutomationProperties(
      ASender: TObject; AProperties: TdxAutomationProperties);
    begin
      if dxUIACalculateAllProperties then
        dxUIACalculateAllProperties := False;  // Disables automatic UIA node property calculation
      AProperties.Name.Calculated := True;  // Enables calculation for the initialized Name UIA property
    end;
    
    procedure TMyForm.FormCreate(Sender: TObject);
    begin
      cxTextEdit1.Properties.Automation.OnInitializeProperties := InitializeAutomationProperties;
      cxCheckBox1.Properties.Automation.OnInitializeProperties := InitializeAutomationProperties;
      cxButtonEdit1.Properties.Automation.OnInitializeProperties := InitializeAutomationProperties;
    end;
    
    See Also