Back to Devexpress

ILegacyInitializationXafApplication Interface

expressappframework-devexpress-dot-expressapp-dot-applicationbuilder-882fe340.md

latest3.2 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public interface ILegacyInitializationXafApplication
vb
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.

csharp
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.

csharp
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

ILegacyInitializationXafApplication Members

DevExpress.ExpressApp.ApplicationBuilder Namespace