'AllowSpin' property was already registered by 'Xceed_Wpf_Toolkit_Primitives_UpDownBase'

Viewed 473

A DateTimePicker used in a WPF UserControl XAML file.

<xctk:DateTimePicker Name="start" AutoCloseCalendar="True" BorderThickness="0" Background="Transparent" BorderBrush="#FFD6D6D6"
                    Value="{Binding Path=StartTime, 
                                    RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:RestrictionPanel}, Mode=TwoWay}"
                    TimeFormat="Custom" TimeFormatString="HH:mm"
                    Format="Custom" FormatString="yyyy-MM-dd   HH:mm"
                    FontSize="22" ShowButtonSpinner="False" ShowDropDownButton="False"
                    TextAlignment="Center" 
                    Maximum="{Binding ElementName=end, Path=Value, TargetNullValue={x:Static sys:DateTime.MaxValue}}"
                    IsEnabled="{Binding ElementName=chk_start, Path=IsChecked}"/>

The error is:

'AllowSpin' property was already registered by 'Xceed_Wpf_Toolkit_Primitives_UpDownBase`1_0_197800013'.

enter image description here

If I replace the above code by just <xctk:DateTimePicker />, the error still exist. How can I solve it?

1 Answers

I can confirm the same issue in both Visual Studio 2017 15.9.12 and Visual Studio 2019 16.13. The issue seems to occur only when the target is "x64" - when I change it to "Any CPU" the issue disappears and all goes back to normal. Not really a solution, rather a workaround, but I hope it helps.

Target x64

Target AnyCPU

Related