Does anyone have an exampe of how to bind any of the Style properties?
I've tried the following but it ignores the style but does pick up the TextBrushStyle and my header is black text on a black background:
XAML
<my:GridViewDataColumn IsGroupable="True" IsFilterable="True" IsReadOnly="True" Header="Reference No." DataMemberBinding="{Binding Path=ReferenceNo}" HeaderCellStyle="{Binding GrdCasesHeaderCellStyle}"
Code
Style _grdCasesHeaderCellStyle;
public Style GrdCasesHeaderCellStyle
{
get { return _grdCasesHeaderCellStyle; }
set
{
_grdCasesHeaderCellStyle = value;
NotifyPropertyChanged("GrdCasesHeaderCellStyle");
}
}
GrdCasesHeaderCellStyle = Application.Current.Resources["GridViewHeaderCellStyle"] as Style;
Resources
<SolidColorBrush x:Key="TextBrush" Color="{StaticResource BlackColor}" />
<Style x:Key="GridViewHeaderCellStyle" TargetType="Telerik_Windows_Controls_GridView:GridViewHeaderCell">
<Setter Property="Foreground" Value="Red"/>
<Setter Property="Background" Value="White"/>
</Style>