This project has moved and is read-only. For the latest updates, please go here.

Cant select color ColorPicker

May 2, 2011 at 7:37 PM
I am binding the color picker to my view model and can correctly show the SelectedColor and set the AvailableColors to my own collection of ColorItems. 
But when i try to select a color in the dropdown, nothing happens. The color that I click on (in the dropdown) gets the red border but the dropdown does not go away, 
the combobox does not change, the viewmodel property setter doesnt fire and the SelectedcolorChanged event doesnt fire.
What am i doing wrong?

here is the xaml:
<wpfkit:ColorPicker x:Name="clrPicker" ShowAdvancedButton="False" DisplayColorAndName="False"  ShowStandardColors="False" ShowAvailableColors="True" IsOpen="False" ShowRecentColors="False" SelectedColor="{Binding SelectedZone.MapColor, Mode=TwoWay}" AvailableColors="{Binding MapColors}" />

View Model

 MapColors = new ObservableCollection<ColorItem>();

MapColors.Add(new ColorItem(Colors.White, "White"));

MapColors.Add(new ColorItem(Colors.Gray, "Gray"));

MapColors.Add(new ColorItem(Colors.Black, "Black"));

May 2, 2011 at 10:47 PM

I am unable to reproduce the issue you are describing.  Make sure you don't have any code that is handling any mouse down events.

May 2, 2011 at 11:04 PM

I found my problem. It was a window focus issue. Nothing to do with ColorPicker. thanks for your help.