Hello,
In my application I try to change the colors from Fluent theme globaly. Unfortunately it seems my changes are ignored. I'm wondering what I'm doing wrong.
To exclude any side effect related to my application I created a new WPF program (.Net Core 5) that just contains a Splash screen and a NavigationView to check if the theme settings are applied. Source code of this test program is attached.
Steps I did to change the theme:
1: I set Fluent theme as the theme of the application (according to Setting a theme using stylemanager). This works fine. Splashscreen and NavigationView appear in Fluent theme.
2: I used color theme generator (Color theme generator) to adapt the colors and copied generated code to clipboard. Pasted the code next to theme setting from 1 (tried both, before and after setting theme)
The settings are done in App.xaml.cs. My test change to Fluent theme is that I change every color to red. When I execute the program, Fluent theme looks normal (blue color, See screenshots). My expectation was that I see a lot of red.
This is the code how I try to adapt the theme:
namespace TelerikStyle
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
// Set the theme
SetTheme();
// Show dummy splash screen
var dataContext = (SplashScreenDataContext)RadSplashScreenManager.SplashScreenDataContext;
dataContext.Content = "Loading Application";
dataContext.Footer = "";
RadSplashScreenManager.Show();
Thread.Sleep(5000);
RadSplashScreenManager.Close();
}
private void SetTheme()
{
StyleManager.ApplicationTheme = new FluentTheme();
FluentPalette.Palette.AccentColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.AccentFocusedColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.AccentMouseOverColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.AccentPressedColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.AlternativeColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.BasicColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.BasicSolidColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.ComplementaryColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.IconColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.MainColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.MarkerColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.MarkerInvertedColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.MarkerMouseOverColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.MouseOverColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.PressedColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.PrimaryBackgroundColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.PrimaryColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.PrimaryMouseOverColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.ReadOnlyBackgroundColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.ReadOnlyBorderColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.ValidationColor = (Color)ColorConverter.ConvertFromString("#FFFF0000");
FluentPalette.Palette.DisabledOpacity = 0.3;
FluentPalette.Palette.InputOpacity = 0.6;
FluentPalette.Palette.ReadOnlyOpacity = 0.5;
}
}
}
Any ideas what I miss?
Thanks and Regards
Philipp