Back to Devexpress

RegistryAccessPolicy.ThrowAlways() Method

corelibraries-devexpress-dot-data-dot-utils-dot-registryaccesspolicy-c16b04c1.md

latest1.9 KB
Original Source

RegistryAccessPolicy.ThrowAlways() Method

Throws an exception when the control accesses the system registry.

Namespace : DevExpress.Data.Utils

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

NuGet Packages : DevExpress.Data.Desktop, DevExpress.ExpressApp.Win.Design

Declaration

csharp
public static void ThrowAlways()
vb
Public Shared Sub ThrowAlways

Remarks

Call the ThrowAlways method at application startup to apply a restrictive policy:

csharp
static void Main() {
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    DevExpress.Data.Utils.RegistryAccessPolicy.ThrowAlways();
    Application.Run(new Form1());
}
vb
Shared Sub Main()
  Application.EnableVisualStyles()
  Application.SetCompatibleTextRenderingDefault(False)
  DevExpress.Data.Utils.RegistryAccessPolicy.ThrowAlways()
  Application.Run(New Form1())
End Sub

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

See Also

ThrowOnErrors()

RegistryAccessPolicy Class

RegistryAccessPolicy Members

DevExpress.Data.Utils Namespace