Skip to main content

Lesson 2 - Show Splash Screen on the Start of the Application

  • 2 minutes to read

This lesson describes how to add a splash screen that is shown at the application startup. All steps in this lesson are similar in both Outlook Inspired and Hybrid App projects.

Open the DevExpress Template Gallery, and run the DXSplashScreen template wizard.

outlook_tut_les2_1

In the DXSplashScreen template wizards, set the splash screen name to “LoadingSplashScreen” and click Add Item.

outlook_tut_les2_2

The added splash screen is a regular WPF UserControl that can be customized in the Visual Studio designer. It contains several elements bound to SplashScreenViewModel properties which allow using the splash screen with the static DXSplashScreen class or through the DXSplashScreenService.

In this tutorial, you will use the DXSplashScreenService. Open the MainWindow.xaml file and run the designer, open the Smart Tag for the root element, and add the DXSplashScreenService.

outlook_tut_les2_3

Customize the added service: set the DXSplashScreenService.SplashScreenType property to the LoadingSplashScreen type and set the DXSplashScreenService.ShowSplashScreenOnLoading property to true.

outlook_tut_les2_4

Below is the resulting XAML.

<dxmvvm:Interaction.Behaviors>
    <dx:DXSplashScreenService SplashScreenType="local:LoadingSplashScreen" ShowSplashScreenOnLoading="True"/>
</dxmvvm:Interaction.Behaviors>

The splash screen is shown when the application is started. It disappears automatically when the main window is loaded and rendered.

outlook_tut_les2_5

Applications that contain the result of this lesson are available here: DevExpress.OutlookInspiredApp and DevExpress.HybridApp.

See Also