我有一个将图表动态绘制到 winform 上的应用程序。
图表背景和单独的图表条都是使用 VisualStyleRenderer 对象绘制的:
For Each rect As Rectangle In barRectangles
Dim renderer As New VisualStyleRenderer (VisualStyleElement.StartPanel.UserPane.Normal)
renderer.DrawBackground(e.Graphics, rect)
next
这绘制了一个具有完整 XP 视觉样式的渲染良好的矩形,我的问题是:如何更改用于绘制形状的颜色?