Back to Devexpress

Fluent Splash Screen

windowsforms-401719-controls-and-libraries-forms-and-user-controls-splash-screen-manager-fluent-splash-screen.md

latest4.0 KB
Original Source

Fluent Splash Screen

  • Sep 03, 2021
  • 2 minutes to read

A Windows 10-inspired splash screen.

  • Features an Acrylic material effect - a partially transparent texture. This effect is only available if the application runs under Windows 10 Version 1803 (OS build 17134) or newer.
  • You can customize and show this splash screen in code.

Show and Close Splash Screen

You can manually create and show a fluent splash screen with the static SplashScreenManager.ShowFluentSplashScreen 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;

// Show a splashscreen.
FluentSplashScreenOptions op = new FluentSplashScreenOptions();
op.Title = "When Only The Best Will Do";
op.Subtitle = "DevExpress WinForms Controls";
op.RightFooter = "Starting...";
op.LeftFooter = "Copyright © 2000 - 2020 Developer Express Inc." + Environment.NewLine + "All Rights reserved.";
op.LoadingIndicatorType = FluentLoadingIndicatorType.Dots;
op.OpacityColor = Color.Gray;
op.Opacity = 130;
op.LogoImageOptions.SvgImage = Resources.Logo;

DevExpress.XtraSplashScreen.SplashScreenManager.ShowFluentSplashScreen(
    op,
    parentForm: this,
    useFadeIn: true,
    useFadeOut: true
);

//Do an operation
//...

//Close the splashscreen
DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm();
vb
' Show a splashscreen.
Dim op As FluentSplashScreenOptions = New FluentSplashScreenOptions()
op.Title = "When Only The Best Will Do"
op.Subtitle = "DevExpress WinForms Controls"
op.RightFooter = "Starting..."
op.LeftFooter = "Copyright © 2000 - 2020 Developer Express Inc." & Environment.NewLine & "All Rights reserved."
op.LoadingIndicatorType = FluentLoadingIndicatorType.Dots
op.OpacityColor = Color.Gray
op.Opacity = 130
op.LogoImageOptions.SvgImage = My.Resources.Logo
DevExpress.XtraSplashScreen.SplashScreenManager.ShowFluentSplashScreen(op, parentForm:=Me, useFadeIn:=True, useFadeOut:=True)

'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 by the SplashScreenManager.SendCommand method.

csharp
FluentSplashScreenOptions op = new FluentSplashScreenOptions();
op.RightFooter = "Done";
SplashScreenManager.Default.SendCommand(FluentSplashScreenCommand.UpdateOptions, op);
vb
Dim op As New FluentSplashScreenOptions()
op.RightFooter = "Done"
SplashScreenManager.Default.SendCommand(FluentSplashScreenCommand.UpdateOptions, op)

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

csharp
public enum FluentSplashScreenCommand {
    UpdateOptions,
    SubscribeToCustomDrawEvent
}
vb
Public Enum FluentSplashScreenCommand
    UpdateOptions = 0
    SubscribeToCustomDrawEvent = 1
End Enum

See Also

Splash Screen Manager