title: Xamarin.Forms Exception has been thrown by the target of an invocation
body: <p>i have a ListView bound to a ObservableCollection, what im trying to do is get some user input in a View and add an Object to my Collection so my ListView gets notified.</p>
  
  <p>Unfortunately my app Crashes when i add something to my Collection with the following Exception Message: Exception has been thrown by the target of an invocation.This is so frustrating ive tried everything no idea why my app crashes by simple Collection Add.</p>
  
  <p>ListView </p>
  
  <pre><code>&lt;ListView  x:Name="lstFruits"
                       ItemsSource="{Binding FruitModel.FruitOptionModel.CurrentFruit.FruitCollection}"
                       ItemTemplate="{StaticResource TemplateSelector}"
                       SeparatorVisibility="None"
                       Grid.Row="1" &gt;
              &lt;ListView.Behaviors&gt;
                &lt;commands:EventToCommandBehavior EventName="ItemTapped" Command="{Binding TappedCommand}" EventArgsConverter="{StaticResource ItemTappedConverter}" /&gt;
              &lt;/ListView.Behaviors&gt;
            &lt;/ListView&gt;
  </code></pre>
  
  <p>and im adding items with following Code:</p>
  
  <pre><code>FruitModel.FruitOptionModel.CurrentFruit.FruitCollection.Add(FruitObject);
  
  
  &lt;ContentPage.Resources&gt;
      &lt;ResourceDictionary&gt;
        &lt;commands:ItemTappedEventArgsConverter x:Key="ItemTappedConverter"/&gt;
        &lt;local:GeräteListItemTemplateSelector x:Name="GeräteListItemTemplateSelector" x:Key="TemplateSelector" /&gt;
      &lt;/ResourceDictionary&gt;
    &lt;/ContentPage.Resources&gt;
  
   public GeräteListItemTemplateSelector()
          {
              neuesGerätDataTemplate = new DataTemplate(typeof(NeuesGerätViewCell));
              gerätDataTemplate = new DataTemplate(typeof(GerätViewCell));
          }
  
          private readonly DataTemplate neuesGerätDataTemplate;
          private readonly DataTemplate gerätDataTemplate;
  
          protected override DataTemplate OnSelectTemplate(object item, BindableObject container) {
              var gerät = item as GerätModel;
              if (gerät.NeuesGerät) {
                  return neuesGerätDataTemplate;
              }
              else {
                  return gerätDataTemplate;
              }
          }
  </code></pre>
  
  <p>StackTrace:</p>
  
  <pre><code> at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00016] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:650 
    at System.RuntimeType.CreateInstanceMono (Boolean nonPublic) [0x000ca] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:115 
    at System.RuntimeType.CreateInstanceSlow (Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, System.Threading.StackCrawlMark&amp; stackMark) [0x0001a] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:89 
    at System.RuntimeType.CreateInstanceDefaultCtor (Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, System.Threading.StackCrawlMark&amp; stackMark) [0x0002a] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/rttype.cs:5599 
    at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00040] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/activator.cs:201 
    at System.Activator.CreateInstance (System.Type type) [0x00000] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/activator.cs:134 
    at Xamarin.Forms.ElementTemplate+&lt;&gt;c__DisplayClass3_0.&lt;.ctor&gt;b__0 () [0x00000] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\ElementTemplate.cs:23 
    at Xamarin.Forms.ElementTemplate.CreateContent () [0x00026] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\ElementTemplate.cs:78 
    at Xamarin.Forms.DataTemplateExtensions.CreateContent (Xamarin.Forms.DataTemplate self, System.Object item, Xamarin.Forms.BindableObject container) [0x00014] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\DataTemplateExtensions.cs:12 
    at Xamarin.Forms.TemplatedItemsList`2[TView,TItem].CreateContent (Int32 index, System.Object item, Boolean insert) [0x00000] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\TemplatedItemsList.cs:527 
    at Xamarin.Forms.TemplatedItemsList`2[TView,TItem].ConvertContent (Int32 startingIndex, IList items, Boolean forceCreate, Boolean setIndex) [0x00014] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\TemplatedItemsList.cs:664 
    at Xamarin.Forms.TemplatedItemsList`2[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e, Boolean fixWindows) [0x0017e] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\TemplatedItemsList.cs:1002 
    at Xamarin.Forms.TemplatedItemsList`2[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\TemplatedItemsList.cs:954 
    at Xamarin.Forms.ListProxy.OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0000a] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\ListProxy.cs:230 
    at Xamarin.Forms.ListProxy+&lt;&gt;c__DisplayClass32_0.&lt;OnCollectionChanged&gt;b__0 () [0x00018] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\ListProxy.cs:203 
    at Xamarin.Forms.ListProxy.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x000a0] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\ListProxy.cs:222 
    at Xamarin.Forms.ListProxy+WeakNotifyProxy.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00031] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\ListProxy.cs:386 
    at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00012] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:288 
    at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (NotifyCollectionChangedAction action, System.Object item, Int32 index) [0x00000] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:351 
    at System.Collections.ObjectModel.ObservableCollection`1[T].InsertItem (Int32 index, System.Collections.ObjectModel.T item) [0x00024] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:219 
    at System.Collections.ObjectModel.Collection`1[T].Add (System.Collections.ObjectModel.T item) [0x00023] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/collections/objectmodel/collection.cs:67 
    at LindeXF.ViewModels.FruitViewModel+&lt;&lt;get_NextButtonCommand&gt;b__85_0&gt;d.MoveNext () [0x00118] in C:\Users\valon\Desktop\Linde\LindeXF\LindeXamarinForms\LindeXF\LindeXF\LindeXF\ViewModels\FruitViewModel.cs:386 
  </code></pre>