Hi,
We’ve found a slightly odd one – if we place the Colorpicker directly on a WPF Window then it works fine, but if we place it in a GridViewColumn in an ListView then our applications fails at runtime with :
System.Windows.Markup.XamlParseException: '{DependencyProperty.UnsetValue}' is not a valid value for property 'DropDownBackground'.
at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
Our ListView is pretty standard, and we are showing the color picker in one of the columns (see below) – we have worked around this by expressly setting the DropDownBackground to a brush, and then it works fine.
Also, bizarely, it doesn’t occur on all Systems – Windows 10 seems fine, Windows 7 seems more likely to do it, but we’ve had reports that seem to be more widespread, so the OS might be a red herring.
<ListView ItemsSource="{Binding Attributes}" Margin="5,0,0,0" >
<GridViewColumn Header="Back Colour" Width="100" >
<GridViewColumn.CellTemplate>
<DataTemplate >
<DockPanel>
<xctk:ColorPicker SelectedColor="{Binding BackColor}"/>
</DockPanel>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</ListView>
Is it something we are obviously getting wrong?
Thanks