This question is locked. New answers and comments are not allowed.
Hi:
I have a collection of custom colors:
I have a color picker:
Through the UI, the user can add custom colors, then when the picker is selected, the loaded event binds as follows:
This all works fine, but after displaying the color picker once, If I add more custom colors through my UI, the picker still shows the old list of custom colors. The new ones do not appear, even if I do an UpdateLayout. How can I make the picker recognize newly added custom colors when displaying the picker multiple times?
Thanks,
Terry
I have a collection of custom colors:
private Collection<Color> CustomColors = new Collection<Color>(); <telerikRibbonBar:RadRibbonDropDownButton x:Name="btnFillColorPicker" Background="White" Width="26" telerikRibbonBar:ScreenTip.Title="Select Fill Color" telerikRibbonBar:ScreenTip.Description="When you click the bucket button, the selected color will be used to fill the selected object." HorizontalAlignment="Center" Click="BackgroundColor_Button_Click"> <telerikRibbonBar:RadRibbonDropDownButton.DropDownContent> <telerikInput:RadColorSelector x:Name="FillColor_Selector" Loaded="RadColorSelector_Loaded" SelectedColorChanged="FillColor_Selector_SelectedColorChanged"/> </telerikRibbonBar:RadRibbonDropDownButton.DropDownContent> </telerikRibbonBar:RadRibbonDropDownButton> private void RadColorSelector_Loaded( object sender, RoutedEventArgs e ) { RadColorSelector sel = sender as RadColorSelector; sel.NoColorText = "Transparent"; sel.MainPaletteHeaderText = "Standard Colors"; sel.StandardPaletteHeaderText = "Custom Colors"; sel.MainPaletteColumnsCount = 10; GetStandardColors(); // populate HeaderColors & MainColors sel.HeaderPaletteItemsSource = HeaderColors; sel.MainPaletteItemsSource = MainColors; sel.StandardPaletteItemsSource = CustomColors; sel.UpdateLayout(); } Thanks,
Terry
