RobinS,
Many thanks for your reply!
> You've probably hashed this out in the C# group, but I has to ask:
> Have you considered serializing r, g, b, and a, or the ToString of
> ToArgb and then using ToArgb and FromArgb to convert back and forth?
Well, the thread on the C# group is here:
http://groups.google.es/group/microsoft.public.dotnet.languages.csharp/browse_th
read/thread/5445fa8ab5aa8928
You are right, I will have to use a separate property of type string as a
serialization holder and use System.Windows.Media.Color.ToString() to set
it. The ToArgb() method doesn't exist in System.Windows.Media.Color.
> I am serializing a System.Drawing.Color value by serializing the
> string representation, and then using a property of type Color that
> uses a converter to convert to and from the string.
The funny thing is is that System.Drawing.Color serializes "automatically"
without the need for a separate representation, as can be seen in the code I
sent in my original message to the C# group above. It really would be nice
to know if there is a reason why System.Drawing.Color can serialize when
System.Windows.Media.Color cannot or if it is an oversight that will be
modified in a future .net framework update.
> Just wondering.
Thanks again, RobinS, much appreciated!

Signature
Thank you,
Christopher Ireland
http://shunyata-kharg.doesntexist.com
"I went to a restaurant that serves 'breakfast at any time.' So I ordered
French Toast during the Renaissance."
Steven Wright
RobinS - 12 Mar 2008 04:37 GMT
> RobinS,
>
[quoted text clipped - 25 lines]
>
> Thanks again, RobinS, much appreciated!
Hmmm. That is really odd. Have you looked at the
System.Windows.Media.ColorConverter class to see if you can convert it to
and from system.windows.color or something usable? Of course, that's not far
off the mark from storing rgba values.
You might check and see if there is a Microsoft Forum for drawing and post
there and see if anyone from MSFT answers. They seem to appear more in the
MSDN forums than they do here (unless you're paying for support).
Good luck!
RobinS.
GoldMail.com
Christopher Ireland - 12 Mar 2008 10:18 GMT
RobinS,
Thanks again for your time!
> Hmmm. That is really odd. Have you looked at the
> System.Windows.Media.ColorConverter class to see if you can convert
> it to and from system.windows.color or something usable? Of course,
> that's not far off the mark from storing rgba values.
No, and whichever alternative way one chooses to represent
System.Windows.Media.Color this still means writing an extra public property
to store the value (public so it serializes correctly).
> You might check and see if there is a Microsoft Forum for drawing and
> post there and see if anyone from MSFT answers. They seem to appear
> more in the MSDN forums than they do here (unless you're paying for
> support).
That's where I posted first and didn't receive a reply. I've tried to check
just now whether anybody has answered but forums.microsoft.com is very slow
indeed at loading into my browser <sigh>.

Signature
Thank you,
Christopher Ireland
http://shunyata-kharg.doesntexist.com
"If he cannot stop the mind that seeks after fame and profit, he will spend
his life without finding peace."
Shobogenzo Zuimonki