All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

Splash Screen Manager

  • 3 minutes to read

The SplashScreenManager allows you to add splash screens to your applications. Splash screens can be displayed during a time-consuming task such as application startup.

TIP

Demo: Utility Controls - Splash Screen

Requires a WPF Subscription. Download

Splash Screen Appearance and Content

Predefined Styles

The following methods create a splash screen with a predefined style:

Content

To specify the splash screen content, pass a DXSplashScreenViewModel as the Create method parameter. See the example below.

SplashScreenManager.CreateThemed(new DXSplashScreenViewModel {
    Copyright = "All rights reserved",
    IsIndeterminate = true,
    Status = "Starting...",
    Title = "",
    Subtitle = "Powered by DevExpress" }
).ShowOnStartup();

You can also access the ViewModel and edit its properties. Use this approach to change the content of an active splash screen. The example below illustrates how to change the progress bar value.

void Calculate() {
    var manager = SplashScreenManager.CreateThemed(new DXSplashScreenViewModel {
    IsIndeterminate = false});
    manager.Show();
    for(int i = 0; i <= 100; i++) {
        //Calculate the progress
        manager.ViewModel.Progress = i;
    }
    manager.Close();
}

Custom Style

Use the Create method to create a custom splash screen. Refer to the How to: Create a Custom Splash Screen tutorial for more information.

Show Splash Screen

The Show method displays the created splash screen. The ShowOnStartup method calls the Show method with the following parameters for a startup splash screen:

 Show(
   owner:null,
   startupLocation:WindowStartupLocation.CenterScreen,
   trackOwnerPosition:true,
   inputBlock:InputBlockMode.None,
   timeout:700);

At Startup

To display a splash screen at the application startup, add the following code to the App.xaml.cs/Application.xaml.vb:

TIP

If you apply the application's theme in App.xaml.cs/Application.xaml.vb, specify it before showing a themed splash screen.

App() {
    ApplicationThemeHelper.ApplicationThemeName = Theme.Office2019DarkGrayName;
    SplashScreenManager.CreateThemed().ShowOnStartup();
}

On Demand

To display a splash screen on top of a UI element, pass the element as the owner parameter and set the startupLocation parameter to CenterOwner. Set the trackOwnerPosition parameter to true to keep the splash screen above the owner when the user drags the owner.

The example below illustrates how to display a wait indicator when the user navigates a HamburgerMenu.

private void HamburgerMenu_Navigating(object sender, DevExpress.Xpf.WindowsUI.HamburgerMenuNavigatingEventArgs e) {
    SplashScreenManager.CreateWaitIndicator().Show((hamburgerMenu.Content as FrameworkElement),
        WindowStartupLocation.CenterOwner, true, InputBlockMode.Owner);
}

Hide Active Splash Screens

To automatically hide the splash screen once the application is initialized, use the ShowOnStartup method with the autoClose parameter set to true.

To hide all active splash screens, call the CloseAll method. You can also access the ActiveSplashScreens collection and use the Close method to hide a specific splash screen.

private void Window_Loaded(object sender, RoutedEventArgs e) {
    SplashScreenManager.CloseAll();
}

MVVM

The SplashScreenManagerService allows you to add the SplashScreenManager functionality to MVVM-compliant applications. Refer to the SplashScreenManagerService topic for more information.