title: WPF GoToStateAction isn't firing when using a DataTrigger
body: <p>Please consider the following piece of code:</p>
  
  <pre><code>&lt;Window&gt;    
      &lt;Window.Tag&gt;
          &lt;Button x:Name="myButton"/&gt;
      &lt;/Window.Tag&gt;
  
      &lt;Grid&gt;
          &lt;VisualStateManager.VisualStateGroups&gt;
              &lt;VisualStateGroup&gt;
                  &lt;VisualState x:Name="VisualState"&gt;
                      &lt;Storyboard&gt;
                          &lt;ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="canvas"&gt;
                              &lt;EasingColorKeyFrame KeyTime="0" Value="Red"/&gt;
                          &lt;/ColorAnimationUsingKeyFrames&gt;
                      &lt;/Storyboard&gt;
                  &lt;/VisualState&gt;
              &lt;/VisualStateGroup&gt;
          &lt;/VisualStateManager.VisualStateGroups&gt;
  
          &lt;Canvas x:Name="canvas" Background="White"&gt;  
              &lt;i:Interaction.Triggers&gt;
                  &lt;ei:DataTrigger Value="True"&gt;
                      &lt;ei:DataTrigger.Binding&gt;
                          &lt;Binding Path="Equals"&gt;
                              &lt;Binding.Source&gt;
                                  &lt;local:DependencyObjectComparer X="{x:Reference myButton}" Y="{x:Reference myButton}"/&gt;
                              &lt;/Binding.Source&gt;
                          &lt;/Binding&gt;
                      &lt;/ei:DataTrigger.Binding&gt;
                      &lt;ei:GoToStateAction StateName="VisualState"/&gt;
                  &lt;/ei:DataTrigger&gt;
                  &lt;i:EventTrigger EventName="MouseLeftButtonDown"&gt;
                      &lt;ei:GoToStateAction StateName="VisualState"/&gt;
                  &lt;/i:EventTrigger&gt;
              &lt;/i:Interaction.Triggers&gt;          
          &lt;/Canvas&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>The DependencyObjectComparer does - suprinsingly - compare "X" and "Y" for equality:</p>
  
  <pre><code>public class EqualityComparer&lt;T&gt; : IEqualityComparer&lt;T&gt;
  {
      public EqualityComparer(Func&lt;T, T, bool&gt; comparer)
      {
          Contract.Requires(comparer != null);
          this.m_comparer = comparer;
      }
  
      public bool Equals(T x, T y)
      {
          return this.m_comparer(x, y);
      }
  
      public int GetHashCode(T obj)
      {
          return obj.ToString().ToLower().GetHashCode();
      }
  
      private readonly Func&lt;T, T, bool&gt; m_comparer;
  }
  
  public class LazyEqualityComparer&lt;T&gt; : DependencyObject
  {
      static LazyEqualityComparer()
      {
          EqualsProperty = DependencyProperty.Register
          (
              "Equals",
              typeof(bool),
              typeof(LazyEqualityComparer&lt;T&gt;),
              null
          );
      }
  
      public static readonly DependencyProperty EqualsProperty;
  
      public Func&lt;T, T, bool&gt; Comparer { get; set; }
  
      public T X
      {
          get { return this.m_x; }
          set
          {
              if (!object.Equals(this.m_x, value))
              {
                  this.m_x = value;
                  this.OnComperandChanged();
              }
          }
      }
  
      public T Y
      {
          get { return this.m_y; }
          set
          {
              if (!object.Equals(this.m_y, value))
              {
                  this.m_y = value;
                  this.OnComperandChanged();
              }
          }
      }
  
      [Bindable(true)]
      new public bool Equals
      {
          get { return (bool)this.GetValue(EqualsProperty); }
          private set { this.SetValue(EqualsProperty, value); }
      }
  
      private void OnComperandChanged()
      {
          this.Equals = new EqualityComparer&lt;T&gt;(
              this.Comparer != null ? this.Comparer : (x, y) =&gt; x.Equals(y)
          ).Equals(this.X, this.Y);
      }
  
      private T m_x;
      private T m_y;
  }
  
  
  public class DependencyObjectComparer : LazyEqualityComparer&lt;DependencyObject&gt; { }
  </code></pre>
  
  <p>While the EventTrigger is firing when I'm clicking on the Canvas, the DataTrigger is not, while it does return the expected value (true). Is there any incompatibility between this kind of Action and this kind of Trigger?</p>
  
  <p>I've no idea what I'm doing wrong here. Thank's for any help.</p>