This question is locked. New answers and comments are not allowed.
Hi,
I am hoping you can guide me in the right direction. I have a requirement whereby the color of the grid column header must match up with the color of the legend in a corresponding graph.
I have the following code which seems to do the trick, however, when a user running Silverlight 4 runtime (The app targets silverlight 4) sees the grid the colors are not displayed. Please see attached images.
Is there anyway I can achieve the required result on both versions of SIlverlight?
I am hoping you can guide me in the right direction. I have a requirement whereby the color of the grid column header must match up with the color of the legend in a corresponding graph.
I have the following code which seems to do the trick, however, when a user running Silverlight 4 runtime (The app targets silverlight 4) sees the grid the colors are not displayed. Please see attached images.
var column = new GridViewDataColumn();
column.Header = graph.DisplayName;
column.DataMemberBinding = new Binding(graph.ValueBinding);
column.DataFormatString = "{0:#.##}";
// Bind Color of Foreground
var foregroundBinding = new Binding("Stroke");
foregroundBinding.Source = graph;
Style headerStyle = new Style(typeof(GridViewHeaderCell));
headerStyle.Setters.Add(new Setter(GridViewHeaderCell.ForegroundProperty, foregroundBinding));
column.HeaderCellStyle = headerStyle;
radGridView.Columns.Add(column);
Is there anyway I can achieve the required result on both versions of SIlverlight?