Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
隐式样式在WPF中不起作用?_Wpf_Scichart - Fatal编程技术网

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

隐式样式在WPF中不起作用?,wpf,scichart,Wpf,Scichart,我正在尝试在SciCharts的AxisPane上设置一些隐式样式-甚至只是更改背景颜色,ala: <Style TargetType="{x:Type SciCharts:AxisPanel}"> <Setter Property="Background" Value="Red"></Setter> </Style> 我曾尝试将样式放置在SciChartSurface.Resources中的Application.Resources中的

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

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

我曾尝试将样式放置在SciChartSurface.Resources中的Application.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 tech lead]

简短回答:不。隐式样式不适用于AxisPanel。我意识到,似乎我必须围绕样式的某些不同部分展开工作,才能得到我想要的。令人沮丧,但有可能。太快了!非常感谢。