Hi,
We are using the ColorPickerGallery as part of a larger colour editor. The picker is in the drop-down of a property grid editor and when the user opens the drop-down we want to have the current colour selected if it is one of the options (it could also be a custom colour and so not in the picker).
In our editor we bind the CategorizedItemsSource property of the gallery to a property in the code behind which we populate with default brushes as well as the user's stored custom colours. We also bind the SelectedItem property to the code behind with the aim of using this to select the current colour(brush) if possible.
The problem is that while we can set the selected item to one of the colours we supply, setting the SelectedItem to one of the auto-generated shades does not cause that colour to be selected in the gallery control. Using the binding to CategorizedItemsSource we can see all the colours, including the generated shades. If the user clicks on a generated shade it becomes highlighted, but setting it from the code behind only works for non-generated colours.
Thanks in advance
Steve