【发布时间】:2015-02-15 13:20:53
【问题描述】:
示例代码如下,
Chart.SerialsCollection(1).Point(1).Format.Fill.ForeColor = System.Drawing.Color.Red;
返回错误。不能隐式转换类型,一个是Struct,一个是ColorFormat。
ForeColor.RGB 是 Int 类型,我只能从 Color.Red.R、Color.Red.G 和 Color.Red.B 中得到 3 个整数。如何将我想要的颜色分配给 ForeColor 属性?
【问题讨论】:
-
你可以在这里找到答案:stackoverflow.com/questions/37786008/…
-
ColorTranslator.ToOle 按照here的建议工作正常。
标签: c# excel colors system.drawing