Thanks, Viktor, yesterday's update is progress.
I was invoking the RadColorSelector via a button click and that was part of my problems. When I updated to the 8/12/2010 release and changed the logic to use a RadColorPicker instead, things got better. However, I am experiencing a problem with AutomaticColor.
I set it in the XAML (it's inside a ribbon group) as follows:
This doesn't work, so I set the AutomaticColor in each dropdown event:
sender, EventArgs e )
RadColorPicker sel = sender
sel.MainPaletteColumnsCount = 10;
// populate HeaderColors & MainColors
sel.HeaderPaletteItemsSource = HeaderColors;
sel.MainPaletteItemsSource = MainColors;
// if you don't do the following, the picker doesn't get updated with custom colors added since last open
sel.StandardPaletteItemsSource = CustomColors;
sel.AutomaticColor = Colors.Transparent;
There are two problems here:
1. Note that I have to set the StandardPaletteItemsSource to an empty array and then set it back in order to pick up additional CustomColors added since the last time the dropdown event occurred. If I remove the first two lines after the comment, I do not see additional colors added to the CustomColors collection. The picker is caching the previous contents of the collection. This is just an inconvenience, as I now have a workaround, but I thought I would report it anyway.
2. The real problem is that the AutomaticColor is updated correctly if you set a breakpoint, but in the SelectionColorChaged event, the resulting color is #FF000000, not #00FFFFFF as I set it (Colors.Transparent). Here is the event code:
sender, EventArgs e )
RadColorPicker selector = sender
Color color = selector.SelectedColor;
txtSelectedFillColor.Text = color.ToString();
selector.SelectedColor is back to #FF000000 no matter what I set it to in the XAML and the dropdown event. The example you provided does work for me, but I want the user to just click on the picker dropdown to select the color.
3. The "A" icon showing the selected color is very cool when you are selecting a text color, but it's confusing for a fill color where the user is used to seeing a paint bucket icon (also showing the current fill color). Is there a fill icon available as well? it would be easy to use my own paint bucket icon, but it would not reflect the current color.
I am attaching a screen shot to show you what the UI looks like. With the right textbox selected, I pick the Transparent color and end up with a black background instead.