Skip to main content
All docs
V24.2

RegistryAccessPolicy Class

Allows you to spot, analyze, and prohibit unwanted requests to the system registry.

Namespace: DevExpress.Data.Utils

Assembly: DevExpress.Data.Desktop.v24.2.dll

Declaration

public static class RegistryAccessPolicy

Remarks

DevExpress UI controls can save, read, and modify configuration settings and options in the system registry. These requests can be initiated in your code or through the internal control engine. The RegistryAccessPolicy allows you to apply global registry access restrictions, or track user/app initiated requests and execute custom actions in response.

Call one of the following methods at application startup to apply a restrictive policy:

The following example suppresses all read/write requests to the system registry:

static void Main() {
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    DevExpress.Data.Utils.RegistryAccessPolicy.SuppressAllOperations();
    Application.Run(new Form1());
}

Use the AllowOperation method to allow a specific registry operation.

Handle SetValue, QueryValue, EnumerateSubKeyTree, DeleteSubKeyTree events to allow or cancel registry operations based on a specific condition.

Tip

Read the following topic for additional information: Registry Access Policy.

Inheritance

Object
RegistryAccessPolicy
See Also