I have the same dialog with xamColorPickers for different objecttypes, so I need separate RecentColorPalettes for each type.
Is it possible to get the recentcolors, so I can save them and then load them again with the next instantiation in a new xamColorPicker.
Actually, the SelectedColorChanged event is fired whenever you hover over a color in the picker so you may store the SelectedColor in the DropDownClosed event.
I hope this helps.
Currently, there is no any direct way to get or set the RecentColors. One option is to handle the SelectedColorChanged event and store the latest selected color. Then you can use the SelectedColor property to restore all of the colors e.g.:
<StackPanel>
<ig:XamColorPicker x:Name="xcp1" Width="200" Height="30"
SelectedColorChanged="xcp1_SelectedColorChanged"/>
<ig:XamColorPicker x:Name="xcp2" Width="200" Height="30" />
<Button Content="Button" Name="button1" Click="button1_Click" />
</StackPanel>
ObservableCollection<Color> Colors { get; set; }
private void button1_Click(object sender, RoutedEventArgs e)
{
foreach (Color c in Colors)
xcp2.SelectedColor = c;
}
private void xcp1_SelectedColorChanged(object sender,
Infragistics.Controls.Editors.SelectedColorChangedEventArgs e)
Colors.Add((Color)e.NewColor);
In order to possibly get this feature into a future release, please submit a feature request at the following webpage: http://devcenter.infragistics.com/Protected/RequestFeature.aspx