我试图在SciCharts的AxisPane上设置一些隐式样式 - 甚至改变背景颜色,ala:
<Style TargetType="{x:Type SciCharts:AxisPanel}">
<Setter Property="Background" Value="Red"></Setter>
</Style>
我已经尝试将样式放在UserControl.Resources中的SciChartSurface.Resources中的Application.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技术主管]