corelibraries-devexpress-dot-data-dot-utils-514164cf.md
Allows you to spot, analyze, and prohibit unwanted requests to the system registry.
Namespace : DevExpress.Data.Utils
Assembly : DevExpress.Data.Desktop.v25.2.dll
NuGet Packages : DevExpress.Data.Desktop, DevExpress.ExpressApp.Win.Design
public static class RegistryAccessPolicy
Public Module RegistryAccessPolicy
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());
}
Shared Sub Main()
Application.EnableVisualStyles()
Application.SetCompatibleTextRenderingDefault(False)
DevExpress.Data.Utils.RegistryAccessPolicy.SuppressAllOperations()
Application.Run(New Form1())
End Sub
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.
Object RegistryAccessPolicy
See Also