This is a migrated thread and some comments may be shown as answers.

Add colors to Standard Colors

4 Answers 255 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
Anand
Top achievements
Rank 1
Anand asked on 04 Sep 2015, 10:00 AM

Hi All

By any chance that I could add a new custom color in to standard color palette please ? 

 I am using RadColorPicker

Thanks in advance

4 Answers, 1 is accepted

Sort by
0
Anand
Top achievements
Rank 1
answered on 07 Sep 2015, 10:15 AM

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

0
Petar Mladenov
Telerik team
answered on 08 Sep 2015, 09:40 AM
Hello Anand,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Anand
Top achievements
Rank 1
answered on 09 Sep 2015, 10:18 AM

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


0
Petar Mladenov
Telerik team
answered on 14 Sep 2015, 07:21 AM
Hi Anand,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ColorPicker
Asked by
Anand
Top achievements
Rank 1
Answers by
Anand
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or