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

Setting VisualStudio2013Palette.Palette.HeaderColor doesn't update all elements

1 Answer 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 21 Oct 2016, 02:12 PM

I'm using NoXaml libraries with the VisualStudio2013 theme. I'm able to set the values of the colours in VisualStudio2013Palette.Palette and this mostly seems to correctly update everything at runtime...

Except that I'm using RadDocking, and each pane has a header. The background is AlternativeColor, and then when you click a header it switches to HeaderColor. If I change AlternativeColor at runtime, the unselected pane headers all update as expected. However the selected pane header is painting in the original colour of HeaderColor, and doesn't change. The only way to change that seems to be to set it during startup (e.g. in my MainWindow constructor).

I looked at the theme implementations. In PaneHeaderControlTemplate there's:

<p><ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Background"></p><p>    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:VisualStudio2013Resource ResourceKey=HeaderBrush}"/><br></ObjectAnimationUsingKeyFrames></p>

 

If I change HeaderBrush to AccentMainBrush and change that at runtime, behaviour is the same. So it must be something about referring to that brush from the animation storyboard that copies the original brush?

Is there a way around this? It would be cool to have the theme consistently change its colours without needing a restart.

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 26 Oct 2016, 11:43 AM
Hello Dan,

Thanks for contacting us.
I'm sorry but I don't think I see the same visual apparance as you in the RadDocking control with VisualStudio2013 theme applied. Each RadPaneGroup has AlternativeBrush applied as Background no matter if it is selected or not. The onliest color that change is the Background of the Grid with Name "Content" that's inside the ControlTemplate of the RadPaneGroup. Please check attached image.

Maybe we are talking about different things. If so can you please provide some more information on your setup. Any image demonstrating what you see onm your side and steps to reproduce are very welcome.

Looking forward to hearing from you. 

Regards,
Evgenia
Telerik by Progress
Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
Tags
General Discussions
Asked by
Dan
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or