Skip to main content

Customize Built-In Splash Forms (WinForms)

  • 2 minutes to read

In XAF, you can customize your application’s built-in splash forms: the default splash screen and the default overlay form.

You can also use custom splash forms.

Prerequisites

To use designer tools for DevExpress controls in .NET 6+ applications, install the DevExpress.Win.Design package from the local NuGet feed, or from a remote NuGet feed at https://nuget.devexpress.com.

Customize the Default Splash Screen

All new XAF applications display the following default Splash Screen:

splashformsplashscreen

You can specify a custom Application Name, Subtitle, Copyright, and Company Name. Access your solution’s WinForms Application project and open the XafSplashScreen.cs (XafSplashScreen.vb) file in the Visual Studio Designer. Click the required element and change its Text property.

Alternatively, you can open the XafSplashScreen.cs (XafSplashScreen.vb) file in code and set these properties in the XafSplashScreen constructor:

public XafSplashScreen() {
    InitializeComponent();
    this.labelApplicationName.Text = "My Application";
    // ...
}

You can also localize a Splash Screen or use a custom Splash Screen.

Customize the Default Overlay Form

When the Solution Wizard enables a default Overlay Form, it uses a DXSplashScreen constructor that takes the overlayFormOptions argument (the DefaultOverlayFormOptions type).

You can use the DefaultOverlayFormOptions() constructor to initialize the default Overlay Form, or you can apply custom settings and pass them to the DefaultOverlayFormOptions(OverlayWindowOptions) constructor.

To modify the default Overlay Form, create a custom painter instance from an OverlayWindowPainterBase descendant or OverlayWindowOptions class.

Image waitImage = Image.FromFile("image.bmp");
OverlayWindowOptions options = new OverlayWindowOptions(
    useFadeIn,
    useFadeOut,
    backColor,
    foreColor,
    opacity,
    waitImage);
winApplication.SplashScreen = new DXSplashScreen(typeof(XafSplashScreen), new DafultOverlayFormOptions(options));