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

Using multiple Windows8 themes

1 Answer 57 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 15 Aug 2013, 11:26 AM
Hi,

I'm working on a WPF 4.0 app which uses the Windows 8 theme with a predominantly green colour scheme. However some parts of the app use a grey colour scheme and this is causing me issues, specifically with RadComboBox.

I've set the colours in Windows8Palette.Palette according to the green colour scheme and that all works fine. My problem comes when I need to use a RadComboBox with the grey colour scheme. I have styles for RadComboBox which set Background, Foreground etc. to the appropriate grey colour scheme colours and I've set the combo box's ItemContainerStyle to one which styles a RadComboBoxItem with the correct colours but some parts of the RadComboBox UI access Windows8Resource directly which gives them the green colour scheme rather than the grey one I want.

For example, in Telerik.Windows.Controls.Input.xaml (for the Windows 8 theme), the style for RadComboBoxItem gives the control a Border called HighlightVisual which is made visible on mouse over. This control sets its Background to "{telerik:Windows8Resource ResourceKey=BasicBrush}" and I haven't been able to figure out a way to set this to a colour from the grey scheme without changing BasicBrush for the whole app.

Is there a way to change this colour for a single control, preferably in a Style?

I could create Styles which duplicate the XAML for RadComboBoxItem etc. and then set the Background to something different but this seems like a lot of effort just to change the Background of a Border!

Cheers,

Richard

1 Answer, 1 is accepted

Sort by
0
Masha
Telerik team
answered on 19 Aug 2013, 08:05 AM
Hello Richard,

There is no way to change the color for a single control when you modify colors using Windows8Palette.

I can suggest edit the control template of the RadComboBox. You can do that by using implicit styles. Here is a very descriptive article on the topic.

I hope it helps.

Regards,
Masha
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
General Discussions
Asked by
Richard
Top achievements
Rank 1
Answers by
Masha
Telerik team
Share this question
or