ILegacyInitializationXafApplication Interface
Contains the InitializeComponent() method that you can use when you migrate your application configuration to the application builder.
Namespace: DevExpress.ExpressApp.ApplicationBuilder
Assembly: DevExpress.ExpressApp.v24.2.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Remarks
Implement this interface in your XafApplication descendant to call the InitializeComponent method on application initialization when you migrate your application configuration to the application builder. This allows you to perform this migration step by step.
When you implement this interface in your application, additionally apply the following modifications:
- Remove the InitializeComponents method call from the application constructor.
- Remove registration of system modules from the
InitializeComponents
method. - Change the
InitializeComponents
method’s access modifier topublic
.
ASP.NET Core Blazor
File: MySolution.Blazor.Server\BlazorApplication.cs.
using DevExpress.ExpressApp.ApplicationBuilder;
// ...
public partial class MySolutionBlazorApplication : BlazorApplication, ILegacyInitializationXafApplication {
// ...
public MySolutionBlazorApplication() {
//InitializeComponent();
}
// ...
public void InitializeComponent() {
//this.systemModule1 = new DevExpress.ExpressApp.SystemModule.SystemModule();
//this.systemBlazorModule1 = new DevExpress.ExpressApp.Blazor.SystemModule.SystemBlazorModule();
// ...
}
}
WinForms
File: MySolution.Win\WinApplication.cs.
using DevExpress.ExpressApp.ApplicationBuilder;
// ...
public class MySolutionWindowsFormsApplication : WinApplication, ILegacyInitializationXafApplication {
// ...
public MySolutionWindowsFormsApplication() {
//InitializeComponent();
}
public void InitializeComponent() {
//this.systemModule1 = new DevExpress.ExpressApp.SystemModule.SystemModule();
//this.winSystemModule1 = new DevExpress.ExpressApp.Win.SystemModule.SystemWindowsFormsModule();
// ...
}
}