Telerik:如何设置CartesianGridLineAnnotation背景颜色

时间:2017-03-03 11:16:57

标签: wpf charts telerik

所以在我的应用程序中,我聊了聊,我添加了CartesianGridLineAnnotation

RadCartesianChart chart;    
CartesianGridLineAnnotation cartesianGridLineAnnotation;

cartesianGridLineAnnotation = new CartesianGridLineAnnotation
{
    Foreground = Brushes.White,
    Background = Brushes.Green,
    Axis = chart.VerticalAxis,
    Stroke = Brushes.Red,
    StrokeThickness = 1,
};

chart.Annotations.Add(...);

因为您可以看到我尝试设置Background颜色,但问题是我在CartesianGridLineAnnotation Label中看不到任何更改。 更改后的其他属性看起来与预期一致。

更新

这就是我填充标签的方式:

cartesianGridLineAnnotation.Label = "bla bla";

如你所见,我看不到backgroud颜色。

enter image description here

0 个答案:

没有答案