All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

SplashScreenManagerService

  • 2 minutes to read

The SplashScreenManagerService allows you to add the SplashScreenManager functionality to MVVM-compliant applications.

Add Service

To use the SplashScreenManagerService, add it to the view's Interaction.Behaviors collection. You can use the Smart Tag as described in the Attaching MVVM Behaviors and Services or as shown in the code snippet below.

<UserControl x:Class="DXSampleSplashScreenService.View.MainView" 
    ...
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" 
    xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
    <dxmvvm:Interaction.Behaviors>
        <dx:SplashScreenManagerService/>
    </dxmvvm:Interaction.Behaviors>
    ...
</UserControl>

Specify Splash Screen View

Use the PredefinedSplashScreenType property to specify which one of the three predefined splash screen styles to display.

The following predefined splash screen styles are available:

  • Themed

  • Fluent

  • WaitIndicator

TIP

You can implement your own splash screen view based on a SplashScreenWindow. Refer to the How to: Create a Custom Splash Screen tutorial for details. In this scenario, set the SplashScreenManagerService.SplashScreenType property to the custom splash screen view type.

Show Splash Screen From View Model

To show and hide the splash screen from your View Model, access the service and use the SplashScreenManagerService.Show and SplashScreenManagerService.Close methods correspondingly.

TIP

A detailed description on how to obtain a service from a View Model (which is a POCO object or a ViewModelBase descendant) is available here: Services in POCO objects and Services in ViewModelBase descendants.

[POCOViewModel]
public class MainViewModel {
    protected ISplashScreenManagerService SplashScreenManagerService { get { return this.GetService<ISplashScreenManagerService>();} }
    public void Display() {
        SplashScreenManagerService.Show();
        //...
        SplashScreenManagerService.Close();
    }
}

Edit Splash Screen Data

Access the SplashScreenManagerService.ViewModel to specify the splash screen data and content.

public void Display() {
    SplashScreenManagerService.ViewModel = new DXSplashScreenViewModel();
    SplashScreenManagerService.ViewModel.Subtitle = "Powered by DevExpress";
    SplashScreenManagerService.ViewModel.Logo = new Uri("../../Images/Logo.png", UriKind.Relative);
    SplashScreenManagerService.Show();
    //...
    SplashScreenManagerService.Close();
}

Options

To display a splash screen on top of a UI element, specify this element as the Owner property value and set the StartupLocation property to CenterOwner. Set the TrackOwnerPosition property to true to keep the splash screen above the owner when the user drags the owner.

Use the InputBlock property to specify the input restriction mode.

Example

TIP

A complete sample project is available at https://github.com/DevExpress-Examples/splashscreenmanagerservice.