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

Refresh colors with Citrix & Office2013Palette

9 Answers 79 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hans
Top achievements
Rank 2
Hans asked on 13 Jan 2015, 03:46 PM
My WPF app allows users to select between 4 accent colors. When they do, I update the Office2013Palette colors accordingly. On my own development machine this is working great: as I change the Office2013Palette all the colors in the app are updated in real-time. But when I deploy the application on Citrix the colors do not change immediately. Instead, it seems that the controls are only updated as they are reloaded/redrawn, for example, when switching between pages in the application.

Is there a way to perhaps force an update of the colors?

9 Answers, 1 is accepted

Sort by
0
cmasdev
Top achievements
Rank 2
answered on 13 Jan 2015, 05:21 PM
Hi Hans, Are you using Implicit styles or not? If you don't, you must use the StyleManager class in order to change colors.

Regards.
0
Hans
Top achievements
Rank 2
answered on 13 Jan 2015, 05:24 PM
Hi Christian,

Yes, I'm making use of implicit styles.
0
cmasdev
Top achievements
Rank 2
answered on 13 Jan 2015, 05:29 PM
Aha. If you're using Implicit Style you must have Theme folder (or something like that) and all your dlls from NoXAML folder. Remember to set LocalCopy to True in all dll properties. Take care about this ;)


Hope it helps.
0
Sia
Telerik team
answered on 14 Jan 2015, 09:18 AM

Hello Hans,

We had similar reports of such behavior depending on particular environment.
Below are our suggestions that should fix it on your end:

1. If you set a default value for AccentColor, do this before InitializeComponent()

Office2013Palette.Palette.AccentColor = Colors.Red;
InitializeComponent();

2. In order to avoid such problems with setting the AccentColor run-time, try to merge the Office2013ResourceDictionary with all keys for its resources before all other resource dictionaries as shown below:
<telerik:Office2013ResourceDictionary />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>

Please try these and let us know whether your issue is resolved.

Regards,

Sia
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
cmasdev
Top achievements
Rank 2
answered on 14 Jan 2015, 11:29 AM
Sia, What about dynamic themes on your #1 item?

Regards.
0
Sia
Telerik team
answered on 15 Jan 2015, 08:59 AM
Hello Christian,

The first one is not applicable when customizing the colors run-time, it could be applicable if there are issues initially. However none of these are mandatory. Most of the cases such customizations apply without any problems. But as I mentioned before, on some specific environments (such as .Net 4.0 Framework on windows server 2003) the same behavior was reproduced locally and that is why I suggested the second one as possible solution.

Merging
<telerik:Office2013ResourceDictionary />
before the rest of needed resource dictionaries could resolve the hit problem. If not we will need more information about the environment in order to find solution on our end. A video showing the observed behavior also would be appreciated.

Regards,
Sia
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Hans
Top achievements
Rank 2
answered on 15 Jan 2015, 03:41 PM
Hi Sia, I can confirm that by adding the resource it now works for me. Happy to see that the solution was quite easy. :-)
0
Benjamin
Top achievements
Rank 1
answered on 21 Jan 2015, 12:06 PM
Hello all,

I had exactly the same problem as Hans and so I followed all your advices and the colors are now updating dynamically when I select a color.

However, I still have two little problems in my RadRibbonView :
- The mouse focus color of each RadRibbonTab headers stays the same as the previous one ;
- The mouse focus color of each Checkboxes stays the same as the previous one.

I have really no idea what could be the solution for this because when I restart my application, all the colors are corresponding to the new one selected before.

Thank you very much in advance for your help !

Regards,
Benjamin.
0
Sia
Telerik team
answered on 22 Jan 2015, 01:32 PM
Hello Benjamin,

The quickest resolution of your problem will be if it is possible to send us a small application reproducing your scenario. It is very important how you merge the needed dictionaries - in code or not - and their order also.

If this is not possible, please let me know:
- which is the version of telerik assemblies that you use?
- which is the theme that you apply?

Despite that I have checked our styles for the MS Checkbox and it seems that it should work as expected in all four themes with dynamic colors - Windows8, Windows8Touch, Office2013 and VisualStudio2013. Since you said that runtime it does not apply, but initially it works as expected, it seems to me that it is related to some specifics in your application. Also I am not sure which is the focus state in RadTabControl that does not change, because as checked locally such is not implemented at all. If sending a sample application is a difficult task, a screen-shot or video will help me a lot in giving you an adequate advice.

Regards,
Sia
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Hans
Top achievements
Rank 2
Answers by
cmasdev
Top achievements
Rank 2
Hans
Top achievements
Rank 2
Sia
Telerik team
Benjamin
Top achievements
Rank 1
Share this question
or