title: Custom RoutedEvent in UserControl not found
body: <p>I'm having some issues with the XAML designer.</p>
  
  <p>I have a UserControl which represents a custom ProgressBar: Just a rotating circle with some colors based on the state.
  It extends UserControl and I have added the local namespace to the XAML file and named it "local".</p>
  
  <pre><code>&lt;UserControl x:Class="MyControls.ProgressControl"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:MyControls"&gt;
  </code></pre>
  
  <p>In code-behind I have created a custom event like so:</p>
  
  <pre><code>public static readonly RoutedEvent NotStartedEvent = EventManager.RegisterRoutedEvent("NotStartedEvent",RoutingStrategy.Bubble,typeof(RoutedEventHandler),typeof(ProgressControl));
  
  // .NET wrapper
  public event RoutedEventHandler NotStarted
  {
      add { AddHandler(NotStartedEvent, value); }
      remove { RemoveHandler(NotStartedEvent, value); }
  }
  </code></pre>
  
  <p>In my XAML file I have an EventTrigger to hook up some animation:</p>
  
  <pre><code>&lt;UserControl.Triggers&gt;
      &lt;EventTrigger RoutedEvent="local:ProgressControl.NotStartedEvent"&gt;
          &lt;StopStoryboard BeginStoryboardName="rotateAnimation"/&gt;
          &lt;BeginStoryboard Storyboard="{StaticResource notStartedStateAnimation}"/&gt;
      &lt;/EventTrigger&gt;
  &lt;/UserControl.Triggers&gt;
  </code></pre>
  
  <p>This however gives me an error: Event 'NotStartedEvent' was not found in type 'UserControl'.</p>
  
  <p>I've searched the web, but couldn't find what I'm doing wrong, it must be some stupid detail. Is it for instance because the EventTrigger is under UserControl.Triggers?</p>
  
  <p>I've tried cleaning and rebuilding the project several times and this works fine. Only the XAML designer is giving me this error.</p>