Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

the value of type "..." cannot be added to a collection or dictionary of type 'uielementcollection'

Tags:

I am gettig following error when i am adding a custom control thru XAML. what can be the possible reason? the 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 -->        <NumericUpDow><NumericUpDown>        .....     </GroupBox> </Grid> 
like image 704
Make It Perfect Avatar asked Apr 28 '11 06:04

Make It Perfect


1 Answers

Problem was that i was not referencing to one dll(which is referenced by numericupdown control) in my solution. Actually NumericUpDown control is not my control, its present in different dll. And this control was refereing System.Windows.Controls.Input.Toolkit.dll. Now I am refereing it in my solution. And things are working

like image 111
Make It Perfect Avatar answered Sep 28 '22 04:09

Make It Perfect