Hi,
I am using XamColorPicker and I am able to successfully set the settings for Standard and Derived Color Palette.
What I am trying to achieve is, loop through the colors in Standard and Derived Color Palette.
I kept DerivedPalettesCount as 10.
I can get required color from Standard color palette as ShiftColorPicker.CurrentPalette.Colors[index].Color.
I want to access derived color palette from code behind as above. When I tried it to access as
ObservableCollection<Infragistics.Controls.Editors.Primitives.ColorStrip> colorStripCollection = ShiftColorPicker.ColorStripManager.ColorStrips;
We can do like above ColorStripManager is a protected member.
Please can you tell me how to access ColorStripManager or how to loop through derived color palette?
Thanks in advance.
Regards,
Raj
Hello Raj,
Thank you for your post.
I have been looking into your question and the ColorStripManager property is protected internal and you can to access it using reflection. I created a sample application based on your scenario to show you how you can implement the functionality that you want to achieve. Also it is possible to access the derived color palette with ColorStripManager if you create a class that derive from XamColorPicker and expose the ColorStripManger property as public and use the derived class instead of the XamColorPicker.
Please let me know if you need any further assistance on this matter.
Hi Zhivko,
Thanks a ton for your sample.
Second one will not work for me as I can't use a derived class.
The first one is the best opt.
Raju
Thank you for your reply.
I am very glad that the approach I have suggested was helpful for you.