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

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


The compiler claims that your control is not an UIElement (i doubt that it is lying), what does your control inherit from?

Tags:

C#

Wpf

Xaml