隐式样式在 SciCharts WPF 中不起作用?

Implicit styles not working in SciCharts WPF?

我正在尝试在 SciCharts 的 AxisPane 上设置一些隐式样式——甚至只是为了更改背景颜色,ala:

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

我试过将样式放置在 Application.Resources 中,在 SciChartSurface.Resources 中,在 UserControl.Resources 中,但完全没有成功。

问题是 AxisPanel 缺少 DefaultStyleKey,并且由于模板中默认设置的各种属性,隐式样式未应用。

我们向 AxisBase 添加了一个名为 AxisPanelStyle 的 属性。这使您可以通过父轴将样式直接应用于轴面板:

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

此更改已提交到 scichart v5.1.0.11306,并将很快推送到夜间构建。

此致, 安德鲁

[SciChart 技术负责人]