I'm trying to style my Y-Axis striplines (eventually to be bound), but I can't seem to do so correctly. Declaritvely, I can set a single chart's ChartArea.AxisY.StripLinesVisibility to Collapsed, but everything I have tried makes it seem as if these guys were impervious to styles. So basically: how to:
* Declare the style correctly in XAML
* Set the style correctly in C#, at the time of Chart creation (I must do it like this, as the charts are created at run time)
Currently, I have in my XAML:
and where I'm creating the chart I have
* Declare the style correctly in XAML
* Set the style correctly in C#, at the time of Chart creation (I must do it like this, as the charts are created at run time)
Currently, I have in my XAML:
<UserControl.Resources> |
<Style TargetType="Rectangle" x:Key="StripLinesYStyle> |
<Setter Property="Visibility" Value="Collapsed" /> |
</Style> |
</UserControl.Resources> |
and where I'm creating the chart I have
var stripLineStyle = this.Resources["StripLinesYStyle"] as Style; |
myChart.DefaultView.ChartArea.AxisY.AxisStyles.StripLineStyle = stripLineStyle; |