Add colors to Standard Colors

5 posts, 0 answers
  1. Anand
    Anand avatar
    30 posts
    Member since:
    Jul 2014

    Posted 04 Sep 2015 Link to this post

    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
  2. Anand
    Anand avatar
    30 posts
    Member since:
    Jul 2014

    Posted 07 Sep 2015 Link to this post

    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

  3. UI for WPF is Visual Studio 2017 Ready
  4. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 08 Sep 2015 Link to this post

    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
  5. Anand
    Anand avatar
    30 posts
    Member since:
    Jul 2014

    Posted 09 Sep 2015 in reply to Petar Mladenov Link to this post

    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


  6. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 14 Sep 2015 Link to this post

    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
Back to Top
UI for WPF is Visual Studio 2017 Ready