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.
In the DXSplashScreen template wizards, set the splash screen name to “LoadingSplashScreen” and click Add Item.
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.
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.