SplashScreen
For defining the information to display in the SplashScreen
, the SplashScreenContent
class is used. See the API
documentation below for the available properties
To show a splash screen, the DialogService
is used. The DialogService
is a singleton service that can be injected
into any page/component. It exposes the following methods to show a splash screen dialog:
ShowSplashScreen
/ShowSplashScreenAsync
(uses theFluentSplashScreen
to show the dialog)ShowSplashScreen<T>
/ShowSplashScreenAsync<T>
where T is a custom component which inherits theFluentSplashScreen
component and implementsIDialogContentComponent<SplashScreenContent>
.
Internally, the ShowSplashScreen
methods call the ShowDialog
methods. If is possible to directly call these methods and thereby have
access to all of the parameters. The ShowSplashScreen
variants are just convenience methods that make ite easier to work with panels.
Examples
Default splash screen
This example shows the standard splash screen. Its content can be altered by means of the
SplashScreenContent
class.
In this example, we simulate a startup process that takes 4 seconds.
Download:
Custom splash screen
The custom example shows a splash screen that uses a customized layout.
See the
CustomSplashScreen
razor file to see how that can be done.
Download:
Documentation
SplashScreenContent Class
Properties
Name | Type | Default | Description |
---|---|---|---|
DisplayTime | int | 4000 | Gets or sets the delay to wait before to close the dialog (in milliseconds). Default is 4000 milliseconds. |
LoadingText | string? | Gets or sets the text to indicate something is happening. | |
Logo | string? | Gets or sets the logo to show on the splash screen. Can be a URL or a base64 encoded string or an SVG. | |
Message | MarkupString? | Gets or sets an extra message. Can contain HTML. | |
SubTitle | string? | Gets or sets the subtitle. Typically used to show the name of the suite the product belongs to. | |
Title | string? | Gets or sets the title. Typically used to show the name of the product. |
Methods
Name | Parameters | Type | Description |
---|---|---|---|
UpdateLabels | string loadingText MarkupString? message | void | Updates the labels of the splash screen. |
FluentSplashScreen Class
Parameters
Name | Type | Default | Description |
---|---|---|---|
Content | SplashScreenContent | ||
Dialog | FluentDialog |