Back to Devexpress

Splash Screen Manager Serialization Specifics

windowsforms-10838-controls-and-libraries-forms-and-user-controls-splash-screen-manager-splash-screen-manager-serialization-specifics.md

latest3.4 KB
Original Source

Splash Screen Manager Serialization Specifics

  • Oct 29, 2020
  • 2 minutes to read

A SplashScreenManager component is serialized differently depending on the selected Active Splash Form (the SplashScreenManager.ActiveSplashFormTypeInfo property).

The Active Splash Form is a Splash Screen or None

An instance of the SplashScreenManager class is declared as a local variable within your main form’s InitializeComponent method. This serialization approach ensures that a Splash Screen Manager is initialized before all other components, and the selected Splash Screen is launched at the very first moment your form starts. However, take note that you will not be able to address the local instance of the SplashScreenManager component that is declared within the InitializeComponent method.

Here are the methods you can use in this scenario.

csharp
// Display a Wait Form
SplashScreenManager.ShowForm(typeof(WaitForm2));
//...
//Change its caption
SplashScreenManager.Default.SetWaitFormCaption("new caption");
//...
//Close the Wait Form
SplashScreenManager.CloseForm();
vb
' Display a Wait Form
SplashScreenManager.ShowForm(GetType(WaitForm2))
'...
'Change its caption
SplashScreenManager.Default.SetWaitFormCaption("new caption")
'...
'Close the Wait Form
SplashScreenManager.CloseForm()

The Active Splash Form is a Wait Form

An instance of the SplashScreenManager class is declared as a local variable of you form, outside the InitializeComponent method. In this case, you can open, close and interact with the selected Wait Form using a SplashScreenManager‘s non-static methods, accessible via the SplashScreenManager instance. These methods are: SplashScreenManager.ShowWaitForm, SplashScreenManager.CloseWaitForm, SplashScreenManager.SetWaitFormCaption, SplashScreenManager.SetWaitFormDescription and SplashScreenManager.SendCommand.