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

RadColorPaletteView throws NullReferenceException during key press

1 Answer 32 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 10 May 2011, 02:25 PM
I am using a RadColorPaletteView with custom colours with 4 RadColorPaletteViewItem's in it each for a color:

<telerik:RadColorPaletteView Grid.Column="0" x:Name="customPaletteView" 
                         Grid.Row="0" AllowDrop="False">
            <telerik:RadColorPaletteViewItem Color="Green" IsEnabled="True" />
            <telerik:RadColorPaletteViewItem Color="Black" Content="Black" IsEnabled="False" />
            <telerik:RadColorPaletteViewItem Color="Red" Content="Red" IsEnabled="True" />
            <telerik:RadColorPaletteViewItem Color="Yellow" Content="Yellow" IsEnabled="True" />            
</telerik:RadColorPaletteView>
And the code behind:
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{            
    customPaletteView.SelectedIndex = -1;
    customPaletteView.Focus();       
}

I am clearing the selected index and setting the focus to the color palette view control. Now if I click somewhere inside the color palette view control without selecting any color(RadColorPaletteViewItem) and press any keyboard key then a NullReferenceException is raised.

If I select a color and press a key then a CastException is thrown.

1 Answer, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 12 May 2011, 03:54 PM
Hello Tony,

Thank you very much for reporting this issue. I managed to reproduce it. I've added it in our PITS under the name "ColorPicker: RadColorPaletteView throws NullReferenceException after key press" and it will be available for tracking tomorrow the latest. We will do our best to fix the issue with any of the following internal builds. I've also updated your Telerik points accordingly.

Kind regards,
Kiril Stanoev
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
Tags
General Discussions
Asked by
Tony
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or