Palette Settings are not Applied When Using RadSplashScreen
Environment
Product Version | 2021.2.615 |
Product | Progress® Telerik® UI for WPF |
Description
When using Xaml binaries with RadSplashScreen control, using the LoadPreset method for changing the color variation of a theme, does not apply to the application. As well as changing the palette properties.
Solution
To change this behavior, create a UserControl class that hosts RadSplashScreen instance and apply the palette settings in the constructor of the UserControl. Then use the generic Show method in order to display it.
First create a custom UserControl class that derives from UserControl. Then set the wanted color variation of the theme, using the LoadPreset method.
Some of the themes do not support multiple color variations. To see which themes have more than one color palette, you can look in the Theme Suite article.
public partial class SplashScreenUserControl : UserControl
{
public SplashScreenUserControl()
{
VisualStudio2019Palette.LoadPreset(VisualStudio2019Palette.ColorVariation.Dark);
InitializeComponent();
}
}
public partial class App : Application
{
public App()
{
StyleManager.ApplicationTheme = new VisualStudio2019Theme();
RadSplashScreenManager.Show<SplashScreenUserControl>();
Thread.Sleep(5000);
RadSplashScreenManager.Close();
}
}