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.