Maintaining the same recent color list for all the RadColorPicker instances

2 posts, 0 answers
  1. Randeep
    Randeep avatar
    3 posts
    Member since:
    Jul 2015

    Posted 01 Jul 2015 Link to this post

    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.
  2. Milena
    Admin
    Milena avatar
    201 posts

    Posted 03 Jul 2015 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top