I'm using System.Drawing to fill rectangles and draw lines and stuff. The System.Drawing.Color object only has a list of pre-defined colors, and I want to assign my own colors using RGB. So I've added the System.Windows.Media namespace, and now all references to "Color" say they're a ambiguous references.
I understand why. But I am wondering if there is a better solution than doing this
System.Windows.Media.Color colorVariableName;
wherever I reference a Color variable.
You're able to alias your usings at the top, so you can say something like
using MediaColor = System.Windows.Media.Color
And you'll be able to say
MediaColor colorVariableName
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With