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

RadColorPaletteViewItem - problems with Black?

2 Answers 63 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
Chad
Top achievements
Rank 1
Chad asked on 13 Jun 2011, 09:47 PM
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?

2 Answers, 1 is accepted

Sort by
0
Accepted
Petar Mladenov
Telerik team
answered on 16 Jun 2011, 02:27 PM
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
0
Chad
Top achievements
Rank 1
answered on 16 Jun 2011, 05:42 PM
Yes, that works.  Thank you.
Tags
ColorPicker
Asked by
Chad
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Chad
Top achievements
Rank 1
Share this question
or