In Silverlight, what is the best way to convert between a System.Drawing.Color and a System.Windows.
- by Gene
I'm trying to convert from a System.Drawing.Color to a Silverlight System.Windows.Media.Color. I'm actually trying to pass this color through a service.
The System.Drawing.Color, passed over the wire, does not serialize the argb value independently.
I can convert the argb value to a 32-bit int
[DataMember]
public int MyColor { get { return Color.Red.ToArgb(); } set {} }
But I don't see any corresponding method in System.Windows.Media.Color to convert that back.
What is the best way to do this?