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

Maintaining the same recent color list for all the RadColorPicker instances

1 Answer 129 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
Randeep
Top achievements
Rank 1
Randeep asked on 01 Jul 2015, 06:42 AM
I am looking for maintaining the same recent color list for all the RadColorPicker instances which we have in application. e. g. if user creates a custom color from one colorpicker (and colorEditor) control, user doesn't have to do the same for another color pickers. User should see the same color in recent colors for the all the color pickers.I am trying to figure out, how to implement it. I see the property RecentColorsItemsSource, which could be of use here , but then, I am not able to get it working. I am trying to set sample colors in the code behind like this:  void radColorPicker_Loaded(object sender, RoutedEventArgs e)
        {
            radColorPicker.RecentColorsItemsSource = new List<Color> { Colors.Red, Colors.Pink };
        } but with this code I am getting this error: "Object reference not set to an instance of an object."}   at Telerik.Windows.Controls.RadColorSelector.BindRecentColorsPalette()
   at Telerik.Windows.Controls.RadColorSelector.BindXamlElements()
   at Telerik.Windows.Controls.RadColorSelector.OnApplyTemplate()
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constr Some help here would be appreciable.

1 Answer, 1 is accepted

Sort by
0
Milena
Telerik team
answered on 03 Jul 2015, 10:30 AM
Hi Randeep,

I have already answered your question in this forum post

However, I would ask you to keep the communication for a particular topic in a single thread. This way we will be able to track the issue easier, organize our communication history better and assist you in a more convenient manner. We appreciate your understanding in this matter.


Regards,
Milena
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
Tags
ColorPicker
Asked by
Randeep
Top achievements
Rank 1
Answers by
Milena
Telerik team
Share this question
or