Cas*_*per 5 wpf xaml datetime datetimepicker
WPF UserControl XAML文件中使用的DateTimePicker。
<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}"/>
Run Code Online (Sandbox Code Playgroud)
错误是:
“ AllowSpin”属性已由“ Xceed_Wpf_Toolkit_Primitives_UpDownBase`1_0_197800013”注册。
如果我用替换上面的代码<xctk:DateTimePicker />,则错误仍然存在。我该如何解决?
我可以在 Visual Studio 2017 15.9.12 和 Visual Studio 2019 16.13 中确认相同的问题。该问题似乎仅在目标为“x64”时出现 - 当我将其更改为“任何 CPU”时,问题消失并且一切恢复正常。不是真正的解决方案,而是一种解决方法,但我希望它有所帮助。
| 归档时间: |
|
| 查看次数: |
214 次 |
| 最近记录: |