This is a migrated thread and some comments may be shown as answers.

Change Fluent Colours At Runtime

5 Answers 293 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 27 Apr 2018, 03:12 PM
Is there a way to change the Fluent Colours while the application is running? I can change the colours to custom colours using FluentPalette.Palette.MainColor during the constructor of my rad window, but it doesn't seem to have an effect if I try and change them while the application is already running (to let the user pick their colour theme).

5 Answers, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 02 May 2018, 10:21 AM
Hello Jason,

I tested the described behavior on my side and the FluentPallete.Pallete.MainColor is successfully changed during runtime. I am attaching the sample project that I used. May I ask you to take a look at the attached project and let me know how it differs from the setup at your side? This way I will be able to further assist you.

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Jason
Top achievements
Rank 1
answered on 02 May 2018, 04:24 PM

Hi Vladimir,

Thanks for the response, my setup differs from yours slightly. For one, I'm using a RadWindow rather than a normal Windows window, that being said when I tried to change your example to a radwindow I'd get a crash every time a button was pressed and am not quite sure what's going on.

That being said when I did more testing I noticed that some of the colours do seem to be updating, but it seems to be struggling to update the colours of some objects that are already drawn like the radtab, radwindow, and radgridview. You can see how it's behaving when I try and change the theme on user selection in the attached gif.


0
Vladimir Stoyanov
Telerik team
answered on 04 May 2018, 03:03 PM
Hello Jason,

Thank you for the attached gif.

I changed the example in order to use a RadWindow instead of a normal Window and I included a RadTabControl but I was not able to reproduce the described behavior. I am attaching the project for your reference. 

My guess is that the observed behavior is due to the fact that the Xaml version of the Telerik UI for WPF dlls is used and the theme is set with the StyleManager. If that is the case, you will have to recreate the controls in order for a change in the FluentPalette's colors to take effect. The suggested approach, however, would be to use implicit styling with the NoXaml version of our binaries as demonstrated in the attached project.

If my guess was incorrect, feel free to provide some more information about your exact scenario and some steps which I can perform in order to reproduce it on my end.

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Vladimir Stoyanov
Telerik team
answered on 04 May 2018, 03:05 PM
Hello Jason,

Please find the sample project attached to this reply.

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Jason
Top achievements
Rank 1
answered on 04 May 2018, 04:15 PM

Hi Vladimir, you are absolutely correct in how I was setting up this UI. I suppose I'll have to do some more research into implicit styling and the NoXaml binaries.

Thanks for the help, Cheers,

J

Tags
General Discussions
Asked by
Jason
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Jason
Top achievements
Rank 1
Share this question
or