Back to Devexpress

Skin Splash Screen

windowsforms-401718-controls-and-libraries-forms-and-user-controls-splash-screen-manager-skin-splash-screen.md

latest3.5 KB
Original Source

Skin Splash Screen

  • Sep 03, 2021
  • 2 minutes to read

A skin-aware splash screen.

  • The colors and font settings are skin dependent.
  • You can customize and show this splash screen in code.

Show and Close Splash Screen

You can manually create and show a skin splash screen with the static SplashScreenManager.ShowSkinSplashScreen method (for instance, you can call it on the application startup). The method’s arguments allow you to specify the content for predefined regions, screen positions, fade animation effects, etc. The image below demonstrates splash screen regions you can customize.

To close the splash screen, use the static SplashScreenManager.CloseForm method.

csharp
using DevExpress.XtraSplashScreen;

// Logo image.
Image myLogoImage = Resources.Logo;

// Show a splashscreen.
SplashScreenManager.ShowSkinSplashScreen(
    logoImage: myLogoImage,
    title: "When Only The Best Will Do",
    subtitle: "DevExpress WinForms Controls",
    footer: "Copyright © 2000 - 2020 Developer Express Inc." + Environment.NewLine + "All Rights reserved.",
    loading: "Starting...",
    parentForm: this
);

//Do an operation
//...

//Close the splashscreen
DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm();
vb
Imports DevExpress.XtraSplashScreen

' Logo image.
Dim myLogoImage As Image = My.Resources.Logo

' Show a splashscreen.
DevExpress.XtraSplashScreen.SplashScreenManager.ShowSkinSplashScreen(
    logoImage:=myLogoImage,
    title:="When Only The Best Will Do",
    subtitle:="DevExpress WinForms Controls",
    footer:="Copyright © 2000 - 2020 Developer Express Inc." & Environment.NewLine & "All Rights reserved.",
    loading:="Starting...",
    parentForm:=Me
)

'Do an operation
'...

'Close the splashscreen
DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm()

Update Splash Screen Dynamically

Splash screens are displayed in a separate thread. You can dynamically update the contents of the current splash screen with a command sent using the SplashScreenManager.SendCommand method.

csharp
SplashScreenManager.Default.SendCommand(SkinSplashScreenCommand.UpdateLoadingText, "Done");
vb
SplashScreenManager.Default.SendCommand(SkinSplashScreenCommand.UpdateLoadingText, "Done")

The DevExpress.XtraSplashScreen.SkinSplashScreenCommand type enumerates the supported commands.

csharp
public enum SkinSplashScreenCommand {
    UpdateTitle,
    UpdateSubtitle,
    UpdateFooter,
    UpdateLoadingText,
    UpdateLogoImage,
    UpdateSvgImageSize
}
vb
Public Enum SkinSplashScreenCommand
    UpdateTitle = 0
    UpdateSubtitle = 1
    UpdateFooter = 2
    UpdateLoadingText = 3
    UpdateLogoImage = 4
    UpdateSvgImageSize = 5
End Enum

See Also

Splash Screen Manager