Skip to main content

Loading Panels / Splash Forms (WinForms)

  • 3 minutes to read

This article provides a general overview of splash forms. It shows splash forms available in XAF, describes how they are initialized, and provides information on how to customize them.

Splash forms are forms XAF WinForms applications show automatically at the application’s startup and when users log in. You can also show splash forms when the application retrieves or saves data or for other operations that may run long - to indicate progress.

The following splash forms are available:

Splash Form Name Default Use Scenarios Possible Use Scenarios Splash Form Appearance
A Splash Screen At the application’s startup To indicate progress when the application retrieves data or when an application exits and saves all related data. splashformsplashscreen
An Overlay Form When you log in To indicate progress and disable the current window while the application accesses data. splashformoverlayform
A Wait Form Not shown At the application’s startup or to indicate progress when the application loads data. splashformwaitform
A Splash Image Not shown To show an image that indicates progress on an application’s startup or when an application works with the database. splashformsplashimage

XAF uses a DXSplashScreen instance and the WinForms Splash Screen Manager to show, update, and close splash forms. If you need to access additional methods, use the SplashScreenManager component directly.

Splash Form Initialization

When you create a new XAF WinForms Application, the Solution Wizard sets the WinApplication.SplashScreen property value to a new DXSplashScreen instance. The Solution Wizard uses the DXSplashScreen(Type, DefaultOverlayFormOptions) constructor.

You can find this code in the WinForms Application project‘s WinApplication.cs (WinApplication.vb) file.

namespace MySolution.Win {
    public partial class MySolutionWindowsFormsApplication : WinApplication {
        public MySolutionWindowsFormsApplication() {
            //...
            SplashScreen = new DXSplashScreen(typeof(XafSplashScreen), new DefaultOverlayFormOptions());
            ExecuteStartupLogicBeforeClosingLogonWindow = true;
        }
        // ...
    }
}

The Solution Wizard sets the ExecuteStartupLogicBeforeClosingLogonWindow property to true in all new XAF applications. This setting keeps the Logon Window and the Overlay Form open until the Main Window loads and while all Startup Actions are executed. For this purpose, the wizard generates new projects with the FrameworkSettings.DefaultSettingsCompatibilityMode property set to Latest.

All new XAF WinForms applications show the default Splash Screen and Overlay Form.

Splash Form Customization

You can customize your application’s splash forms in several ways:

You can also localize splash forms.

See Also