我有一个基于materialdesigninxaml框架的应用程序,我可以在其中设置亮和暗颜色,当设置了亮颜色时,我可以正确地看到黑色的标签文本,但当我设置暗主题时,图表的标签仍然是黑色的,所以我看不到任何东西。这是我的图表:
<lvc:CartesianChart Series="{Binding}" LegendLocation="Bottom">
<lvc:CartesianChart.AxisY>
<lvc:Axis Labels="{Binding AnalysisController.Labels}"/>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>我尝试按照文档中的建议将其添加到我的App.xaml中:
<ResourceDictionary Source="pack://application:,,,/LiveCharts.Wpf;component/Themes/Colors/white.xaml" />但是文本的颜色仍然是黑色的
发布于 2018-01-29 14:26:27
可以将轴的Foreground设置为另一种颜色,如下所示:
<lvc:CartesianChart Series="{Binding}" LegendLocation="Bottom">
<lvc:CartesianChart.AxisY>
<lvc:Axis Labels="{Binding AnalysisController.Labels}"
Foreground="White"/>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>https://stackoverflow.com/questions/48476988
复制相似问题