Back to Devexpress

SplashScreenManager.Create(Func<Window>, DXSplashScreenViewModel) Method

wpf-devexpress-dot-xpf-dot-core-dot-splashscreenmanager-dot-create-x28-system-dot-func-system-dot-windows-dot-window-devexpress-dot-mvvm-dot-dxsplashscreenviewmodel-x29.md

latest4.3 KB
Original Source

SplashScreenManager.Create(Func<Window>, DXSplashScreenViewModel) Method

Creates a custom splash screen.

Namespace : DevExpress.Xpf.Core

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public static SplashScreenManager Create(
    Func<Window> splashScreenWindowFactory,
    DXSplashScreenViewModel viewModel = null
)
vb
Public Shared Function Create(
    splashScreenWindowFactory As Func(Of Window),
    viewModel As DXSplashScreenViewModel = Nothing
) As SplashScreenManager

Parameters

NameTypeDescription
splashScreenWindowFactoryFunc<Window>

A function that creates the splash screen window.

|

Optional Parameters

NameTypeDefaultDescription
viewModelDXSplashScreenViewModelnull

A view model that specifies options for the splash screen.

|

Returns

TypeDescription
SplashScreenManager

A DevExpress.Xpf.Core.SplashScreenManager object that represents the created splash screen.

|

Remarks

The following example illustrates how to create a custom waiting indicator:

csharp
SplashScreenManager.Create(() => new SplashScreenWindow() {
    AllowTheming = true,
    Content = new WaitIndicator() { DeferedVisibility = true }
});
vb
SplashScreenManager.Create(Function() New SplashScreenWindow() With {
    .AllowTheming = True,
    .Content = New WaitIndicator() With {.DeferedVisibility = True}
})

Refer to the How to: Create a Custom Splash Screen tutorial for more information.

Use the Show method to display the splash screen.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Create(Func<Window>, DXSplashScreenViewModel) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-spreadsheet-create-custom-progress-indicator/CS/WpfSpreadsheetProgressSample/MainWindow.xaml.cs#L31

csharp
// in the splash screen.
splashScreenManager = SplashScreenManager.Create(() => new CustomSplashScreen(cancellationTokenSource), new DXSplashScreenViewModel {
    Title = displayName,

wpf-spreadsheet-create-custom-progress-indicator/VB/WpfSpreadsheetProgressSample/MainWindow.xaml.vb#L34

vb
' in the splash screen.
splashScreenManager = SplashScreenManager.Create(Function() New CustomSplashScreen(cancellationTokenSource), New DXSplashScreenViewModel With {
    .Title = displayName,

See Also

SplashScreenManager Class

SplashScreenManager Members

DevExpress.Xpf.Core Namespace