2010-07-16, 08:25 PM
imilne Wrote:Can I ask kindof the reverse: how do I read a colour from the xml into a plugin (so I can draw something in a colour defined by the skin)?GetColor() was really just meant as an internal method to the SkinHelper but for some reason it ended up public. Its sole purpose is to take string with a solid color name ("Black", "White", "Red", "LightGray" ... "Salmon" etc), or a web style color "#RRGGBB", and return the matching .Net Color object. It is not used for looking up custom color definitions in the skin file.
I've found SkinHelper.GetColor() but I'll be buggered if I can get it to work. Maybe I'm not specifying the colour properly in the skin? I've tried <NamedColor> and <Color> both within <NamedColors> and <Colors> groups. The SkinHelper always returns white, even if I pass it a string that doesn't exist.
Iain