0

I'm trying to set some implicit styles on the AxisPane of SciCharts -- just even to change a background color, ala:

<Style TargetType="{x:Type SciCharts:AxisPanel}">
    <Setter Property="Background" Value="Red"></Setter>
</Style>

I've tried placing the style in the Application.Resources, inside the SciChartSurface.Resources, in a UserControl.Resources, and have had absolutely no luck.

Locke
  • 1,133
  • 11
  • 32
  • 1
    Short answer: No. Implicit styles are not applied to AxisPanels. – mm8 Feb 28 '18 at 20:50
  • I'm realizing that it looks like I have to work around some of the different parts of the Styling to get to what I want. Frustrating, but possible. – Locke Mar 01 '18 at 16:47

1 Answers1

1

The issue was that the AxisPanel was missing DefaultStyleKey and because of various properties set by default in the template, implicit styles were not applying.

We have added a property to AxisBase called AxisPanelStyle. This lets you apply a style directly to the axis panel via the parent axis:

 <s:SciChartSurface>
      <s:SciChartSurface.XAxis>
           <s:NumericAxis AxisPanelStyle="{StaticResource AStyleWithTargetTypeAxisPanel}"/>              
      </s:SciChartSurface.XAxis>
 </s:SciChartSurface>

This change has been committed to v5.1.0.11306 of scichart and pushed to nightly build shortly.

Best regards, Andrew

[SciChart tech lead]

Dr. Andrew Burnett-Thompson
  • 20,980
  • 8
  • 88
  • 178