SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components


I do not seem to be able to set the property YAxis.Visibility of BaseRenderableSeries as part of a Trigger.

<Style TargetType="s:BaseRenderableSeries">
            <Trigger Property="IsVisible" Value="True">
                <Setter Property="YAxis.Visibility" Value="Visible"/>

            <Trigger Property="IsVisible" Value="False">
                <Setter Property="YAxis.Visibility" Value="Collapsed"/>

I want to make the associated yAxis Visiblity be a function of whether the matching Renderable Series is visible or not. I checked and BaseRenderableSeries has a YAxis property that can be set. Why is “YAxis.Visibility” in the setter property throwing an error in xaml?

Note: I have multiple yAxes in one surface and each renderable series has its own yAxis


  • You must to post comments

Hi Matt,

What error is it showing in XAML?

I’m guessing that because BaseRenderableSeries.YAxis is not a dependency property, the trigger won’t work.

What about workaround around this by having an attached behaviour that modifies BaseRenderableSeries.YAxis.Visibility directly?

  • bbmat
    Interestingly no error showed, the trigger was just not invoked. I did in the end just what you suggested, an attached behavior. Thanks
  • Andrew Burnett-Thompson
    Great :) Glad it’s resolved!
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.