当我通过 XAML 添加自定义控件时,出现以下错误。可能的原因是什么?
A value of type '...' cannot be added to a collection or dictionary of type 'UIElementCollection'
<Grid x:Name="QuantityDetail" DataContext="{StaticResource ViewModel}">
<GroupBox>
.....
<Label Style="{StaticResource ResourceKey=LabelValue}">Min</Label>
<!-- The following control -->
<NumericUpDown></NumericUpDown>
.....
</GroupBox>
</Grid>
问题是我没有在我的解决方案中引用一个 dll(由 numericupdown 控件引用)。
实际上NumericUpDown控件不是我的控件,它存在于不同的dll中。这个控件引用了System.Windows.Controls.Input.Toolkit.dll。现在我在我的解决方案中引用它。事情正在运作
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)