When using the XamColorPicker in a DataTemplate the custom captions appear to be ignored.
I have a simple project where the XamColorPicker is used in the DataTemplate of an ItemsControl:
<Window x:Class="WpfApplication8.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ig="http://schemas.infragistics.com/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <ItemsControl Margin="0,3,5,3" ItemsSource="{Binding}"> <ItemsControl.ItemTemplate> <DataTemplate DataType="string"> <StackPanel Orientation="Horizontal"> <ig:XamColorPicker Width="80" AdvancedButtonCaption="Custom" CurrentColorCaption="Custom:" CurrentPaletteCaption="Custom:" DerivedColorPalettesCaption="Custom:" RecentColorPaletteCaption="Custom:" /> </StackPanel> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </Grid> </Window>
And the following code behind:
public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); DataContext = new List<string> {"test"}; } }
The custom labels are ignored. If you place the XamColorPicker outside of the ItemsControl the properties are applied as you would expect.
I am using version 14.1.20141.2108
Hello Michael,
Thank you for your post.
I have been looking into your post and the snipped code that you have attached and I have logged this behavior with our developers in our tracking system, with an issue ID of 187967 I have also created a support ticket on your behalf with number CAS-150323-L7S5D7 in order to link the development issue to it so that you are automatically updated when a Service Release containing your fix is available for download.
While our development team is investigating this issue, I can suggest handle DropDownOpened e event of XamColorPicker and in the event handler you can set the properties for captions you wish. I created a short sample application based on the code that you have provided to show how you can achieve this.
Please let me know if you need any further assistance on this matter.
We have shipped out a new service release where your issue is resolved. I'd be glad to find out if you had tested it out and if it had met your requirements.
You can download the Service Releases by logging to our web site and going to Account\My Keys and Downloads.
I have passed the information on to our development team. Thank you for the response.
Thank you for your feedback.
Please let me know if you need any further assistance.