title: the value of type "..." cannot be added to a collection or dictionary of type 'uielementcollection'
body: <p>I am gettig following error when i am adding a custom control thru XAML. what can be the possible reason?
  <strong>the value of type "..." cannot be added to a collection or dictionary of type 'uielementcollection'</strong></p>
  
  <pre><code>&lt;Grid  x:Name="QuantityDetail" DataContext="{StaticResource ViewModel}"&gt;
      &lt;GroupBox&gt;
         .....
         &lt;Label Style="{StaticResource ResourceKey=LabelValue}"&gt;Min&lt;/Label&gt;
         &lt;!-- The following control --&gt;
         &lt;NumericUpDow&gt;&lt;NumericUpDown&gt;
         .....
      &lt;/GroupBox&gt;
  &lt;/Grid&gt;
  </code></pre>