Skip to main content
All docs
V25.1
  • ApplicationThemeHelper.Preload<T>(Boolean) Method

    Preloads theme resources for the view specified by the UserControl.

    Namespace: DevExpress.Xpf.Core

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

    NuGet Package: DevExpress.Wpf.Core

    Declaration

    public static void Preload<T>(
        bool runTypeInitializers = false
    )
        where T : UserControl, new()

    Optional Parameters

    Name Type Default Description
    runTypeInitializers Boolean False

    true to invoke static constructors; otherwise, false.

    Type Parameters

    Name Description
    T

    A UserControl or its descendant.

    Remarks

    The following code sample preloads resources for the MyControl while the Splash Screen Manager is displayed:

    using DevExpress.Xpf.Core;
    using System.Windows;
    
    public partial class App : Application {
        static App() {
            SplashScreenManager.CreateThemed().ShowOnStartup();
            ApplicationThemeHelper.Preload<MyControl>();
        }
    }
    

    Refer to the following help topic for more information: Preload Theme Resources.

    See Also