Skip to main content
All docs
V24.1
.NET 6.0+
  • The page you are viewing does not exist in the .NET Framework 4.5.2+ platform documentation. This link will take you to the parent topic of the current section.

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.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public interface ILegacyInitializationXafApplication

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:

  1. Remove the InitializeComponents method call from the application constructor.
  2. Remove registration of system modules from the InitializeComponents method.
  3. Change the InitializeComponents method’s access modifier to public.

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();
        // ...
    }
}
See Also