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
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