Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > ColorPicker > RadColorPaletteViewItem - problems with Black?

Answered RadColorPaletteViewItem - problems with Black?

Feed from this thread
  • Chad avatar

    Posted on Jun 13, 2011 (permalink)

    Hello,

    I'm trying to use a RadColorPaletteView with my own list of custom colors, in this way:

    <TInputControls:RadColorPaletteView Height="18" SelectionChanged="RadColorPaletteView_SelectionChanged" >
    <TInputControls:RadColorPaletteViewItem Color="Red" />
    <TInputControls:RadColorPaletteViewItem Color="Orange"/>
    <TInputControls:RadColorPaletteViewItem Color="Yellow" />
    <TInputControls:RadColorPaletteViewItem Color="Green" />
    <TInputControls:RadColorPaletteViewItem Color="Blue" />
    <TInputControls:RadColorPaletteViewItem Color="Purple" />
    <TInputControls:RadColorPaletteViewItem Color="White" />
    <TInputControls:RadColorPaletteViewItem Color="Black" />
    </TInputControls:RadColorPaletteView>

    In my app, the black doesn't show up.  Instead, I get a square that seems to have a transparent background.  If I hover close to the border of that square, sometimes it allows me to select it, but most of the time I can't select the square.

    I've tried moving the black to other positions in the list, and tried the hex value instead of the name, and it seems to have the same problem.  Additionally, if I wrap the RadColorPaletteViewItems in a plain ListBox instead of the RadColorPaletteView, the "black" one still has the same problem.

    Is there something I need to do differently?

    Reply

  • Answer Petar Mladenov Petar Mladenov admin's avatar

    Posted on Jun 16, 2011 (permalink)

    Hello Chad,

    We logged this as a bug in our PITS and we also updated your telerik account points as a thanks.
    Possible workaround is to bind the ColorPaletteView like so:
    <telerik:RadColorPaletteView x:Name="palette" />

    public MainWindow()
        {
            InitializeComponent();
            Collection<Color> colors = new Collection<Color>();
            colors.Add(Colors.Red);
            colors.Add(Colors.Green);
            colors.Add(Colors.Blue);
            colors.Add(Colors.Black);
            this.palette.ItemsSource = colors;
    Please let us know if this satisfies you.

    Best wishes,
    Petar Mladenov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Chad avatar

    Posted on Jun 16, 2011 (permalink)

    Yes, that works.  Thank you.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > ColorPicker > RadColorPaletteViewItem - problems with Black?
Related resources for "RadColorPaletteViewItem - problems with Black?"

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