I have defined an implicit style for telerik GridViewHeaderCell which changes the background color for header cells of all grids used in the application. On some screens the caption of GridViewHeaderCell is formatted to be Bold by defining the style in that specific xaml file. This change of font overwrites the implicit GridViewHeaderCell styles applying the default Office Black style. My implicit style is given below
Following is the style which is defined for making the caption bold
Is there any way to stop the BoldFontStyle from overwriting the implicit style? I know it can be fixed by making Background transparent for BoldFontStyle but in that case the change has to be implemented on every screen where this BoldFontStyle is defined. I don't want to follow that approach.
<
Style
TargetType
=
"telerik:GridViewHeaderCell"
>
<
Setter
Property
=
"Background"
Value
=
"{StaticResource GridView_HeaderBackground}"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"{StaticResource GridView_HeaderOuterBorder}"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"0 0 0 0"
/>
<
Setter
Property
=
"VerticalContentAlignment"
Value
=
"Center"
/>
<
Setter
Property
=
"HorizontalContentAlignment"
Value
=
"Stretch"
/>
<
Setter
Property
=
"Padding"
Value
=
"5 0 3 0"
/>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource GridView_HeaderForeground}"
/>
</
Style
>
Following is the style which is defined for making the caption bold
<
Style
x:Key
=
"BoldFontStyle"
TargetType="c:Control">
<
Setter
Property
=
"FontWeight"
Value="Bold" />
</
Style
>
Is there any way to stop the BoldFontStyle from overwriting the implicit style? I know it can be fixed by making Background transparent for BoldFontStyle but in that case the change has to be implemented on every screen where this BoldFontStyle is defined. I don't want to follow that approach.