Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > ColorPicker > itrating over each color in colorpicker

Not answered itrating over each color in colorpicker

Feed from this thread
  • Earthcaller avatar

    Posted on Oct 7, 2011 (permalink)

    Hello Telerik team,

    Can you please suggest how to itrate over each color in the main Palette when it is set to "web216". What I want is I should be able to set and get color by looping over each color in the palette with the help of an index.
    eg:
    var int myColor = web216[1]
    and vice versa.

    thank you very much.
    regards.

     

    Reply

  • Earthcaller avatar

    Posted on Oct 10, 2011 (permalink)

    Telerik Team!
    Could you please reply my query.

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Oct 12, 2011 (permalink)

    Hi Earthcaller,

    I prepared a project for you that meets this requirement. Basically, I iterate over the visual tree of the RadCoorPicker, find the RadColorSelector and then print the names of the colors from the MainPalette in the Output of VisualStudio. Note that you first have to open the RadColorPicker  in order to load the RadColorSelector. Otherwise you won't be able to find it.  
    Please let us know if the solution satisfies you.

    Best wishes,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Attached files

    Reply

  • Earthcaller avatar

    Posted on Oct 13, 2011 (permalink)

    Thank you very much for your response.
    But the thing is can we somehow open the colorpicker and close it without being noticed by the user.
    Or can we not just create one RadColorSelector and populate it with the desired Palette programmatically
     and iterate over it?? I tried to do it but no luck.
    Any help would be highly appreciated.
    regards.

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Oct 17, 2011 (permalink)

    Hi Earthcaller,

     Expanding and Collapsing the ColorPicker without being noticed is bad design. I prepared a sample for you that shows how to iterate over the MainPalette of both standard and bound one RadColorSelector. Please let us know if this is what you have tried before.

    All the best,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > ColorPicker > itrating over each color in colorpicker
Related resources for "itrating over each color in colorpicker"

WPF ColorPicker Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]