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

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ILegacyInitializationXafApplication Interface

In This Article

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

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