title: the value of type '' cannot be added to a collection or dictionary of type ''
body: <p>I have attached property <code>InteractionService.Triggers</code>, which is of type <code>TriggersCollection</code>, which derives from <code>List&lt;ITrigger&gt;</code>. So I put in XAML some trigger objects, and each one of them implements interface <code>ITrigger</code>. It works fine and was builded without any errors. But when I ported this library from Silverlight 5 to Windows Phone 8 and try to use it with scenario described above, Visual Studio 2012 underlined this XAML with blue line and tells that there is an such error. When I compile project, error dissapear from XAML in VS2012 until next edits in this XAML file.
  How can I resolve this issue? Or this is a bug of VS2012 with WP8 SDK? Is there any workaround for this case?</p>
  
  <p>Fragment of XAML (underlined by VS2012+WP8SDK, but not by VS2010+SL5):</p>
  
  <pre><code>&lt;deToolkit:InteractionService.Triggers&gt;
     &lt;deToolkit:EventTrigger EnterEvent="Loaded"&gt;
         &lt;deToolkit:CommandSetter Command="{Binding LoadCommand}" /&gt;
     &lt;/deToolkit:EventTrigger&gt;
  &lt;/deToolkit:InteractionService.Triggers&gt;
  </code></pre>
  
  <p>TriggersCollection:</p>
  
  <pre><code>public class TriggersCollection : List&lt;ITrigger&gt; { }
  </code></pre>
  
  <p>Header of EventTrigger class:</p>
  
  <pre><code>public class EventTrigger : TriggerBase
  </code></pre>
  
  <p>Header of TriggerBase class:</p>
  
  <pre><code>public class TriggerBase : DependencyObject, ITrigger
  </code></pre>
  
  <p>Fragment of class InteractionService:</p>
  
  <pre><code>public sealed class InteractionService : DependencyObject
  {
      #region [ADP] Triggers : TriggersCollection (Triggers applied to control)
  
      public static void SetTriggers(DependencyObject element, TriggersCollection value)
      {
          element.SetValue(TriggersProperty, value);
      }
  
      public static TriggersCollection GetTriggers(DependencyObject element)
      {
          var triggers = (TriggersCollection)element.GetValue(TriggersProperty);
          if (triggers == null)
          {
              var collection = new TriggersCollection();
  
              if (!DesignerProperties.IsInDesignTool)
              {
                  // -- some code --
              }
  
              SetTriggers(element, collection);
              return collection;
          }
          return triggers;
      }
  
      public static readonly DependencyProperty TriggersProperty =
          DependencyProperty.RegisterAttached("Triggers", typeof(TriggersCollection), typeof(InteractionService), null);
  
      #endregion Triggers
  }
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>A value of type 'EventTrigger' cannot be added to a collection or dictionary of type 'TriggersCollection'.</p>
  </blockquote>
  
  <p>Another one error that sometimes throwed instead:</p>
  
  <blockquote>
    <p>The value "EventTrigger" is not of type "ITrigger" and cannot be used in this generic collection. Parameter name: value</p>
  </blockquote>