This is a migrated thread and some comments may be shown as answers.

Storing Color Info

1 Answer 78 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
Voss Grose
Top achievements
Rank 1
Voss Grose asked on 29 Jul 2009, 03:59 PM
Do you have a recommendation on how best save color information to a Database if I'm using the ColorPicker?

When I retrieve the information back and want to use it I'm having a difficult time figuring out how to convert a string to a SolidColorBrush object.


1 Answer, 1 is accepted

Sort by
0
Accepted
Bobi
Telerik team
answered on 30 Jul 2009, 08:28 AM
Hello Voss Grose,

Please take a look at the following online example that demonstrates how to use different color format :
http://demos.telerik.com/silverlight/#ColorPicker/ColorPaletteView

The easiest way is to use  the build in:

    ColorPaletteBase.HexStringToColor("#FF475A1D");


So you can store in the database strings like "#FF475A1D" and after that transform then in to color objects in this way:
                         Color color = ColorPaletteBase.HexStringToColor("#FF475A1D");

I hope that this answers your question.

Regards,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
ColorPicker
Asked by
Voss Grose
Top achievements
Rank 1
Answers by
Bobi
Telerik team
Share this question
or