Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从颜色代码创建画笔?
#FFFFE4C4是我所说的颜色代码的一个例子。 例如我想做的是
#FFFFE4C4
Brush brush = new Brush(#FFFFE4C4);
首先从颜色代码中获取颜色,然后从中创建画笔:
Brush brush = new SolidBrush((Color)ColorConverter.ConvertFromString("#FFFFE4C4"));