4 Answers, 1 is accepted
Though I see colors in the standard color list, I dint see any color's object when I access FontColorPicker.StandardPaletteItemsSource. The enumeration list is always null.
And this happens for the FontColorPicker.RecentColorsItemsSource as well. I have add a custom color by setting IsRecentColorsActive = true, but still I don't see the color list when get to FontColorPicker.RecentColorsItemsSource.
Could some one help in this please ? Thanks
Could you please share with us your RadColorPicker configuration?
- how do you bind the StandardPaletteItemsSource
- how do you bind the RecentColorsItemsSource
- what steps do you perform, selection, opening, changes in the source collection
- which is the Telerik UI for WPF version that you use
You can use the attached solution as a base for our discussion. Let me know what changes do I need to introduce in order to match your scenario.
Regards,
Petar Mladenov
Telerik
Hi Petar,
Thanks for the reply. I have developed and attached a solution for my scenario.
Rename the attached gif to docx , open it in word, you would find a zip folder , copy it to desktop and extract it.
Then please open the sample project, run it. You could see a arrow mark , click to see the color picker. Click more options, you see custom color picker, pick a color it gets add in the recent item list.
In MainWindow.cs i am trying to access the recent item list on selected color changed event, but I get only null. I would like to access the recent color's that are added in the recent items. Not sure how to get this list ? Can you help me in this please ?
I need to populate another controls recent item list from this control.
Thanks in Advance
Please find attached a possible solution with CistomColorPicker - a class that inherits from RadColorPicker and gets the RecentColorsPalette control in order to access its ItemsSource in code behind.
Please have in mind that by the time SelectedColorChanged fires, the newly added selected colors is not yet added in the RecentColors Collection.
However, I believe this will help you move forward.
Regards,
Petar Mladenov
Telerik