ApplicationThemeHelper.Preload(Func<UserControl>) Method
In This Article
Preloads theme resources for the view specified by the UserControl and allows you to initialize this view before the preload.
Namespace: DevExpress.Xpf.Core
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
#Declaration
public static void Preload(
Func<UserControl> createAction
)
#Parameters
Name | Type | Description |
---|---|---|
create |
Func<User |
A function that initializes the preloaded User |
#Remarks
Use this method if the preloaded view is “lightweight” and you populate it with controls at runtime or based on a parameter.
The following code sample calls the MyControl.Populate() method and preloads resources for the MyControl after the method is executed:
using DevExpress.Xpf.Core;
using System.Windows;
public partial class App : Application {
static App() {
SplashScreenManager.CreateThemed().ShowOnStartup();
ApplicationThemeHelper.Preload(() => new MyControl().Populate());
}
}
Refer to the following help topic for more information: Preload Theme Resources.
See Also