繁体   English   中英

如何在 OxyPlot 中获得所有颜色?

[英]How I can get all colors in OxyPlot?

我有一个问题。 我在 WPF、C# 中使用 OxyPlot。 我需要将所有颜色设置为 MarkerType 和 MarkerStroke 系列。 我如何获得所有颜色?

Green、IndianRed 等是静态 OxyColors 类中的静态字段。 使用来阅读所有这些

var colors = typeof(OxyColors)
             .GetFields(BindingFlags.Static | BindingFlags.Public)
             .Where(f => f.FieldType == typeof(OxyColor))
             .Select(f => f.GetValue(null))
             .Cast<OxyColor>()
             .ToList();

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM