title: WPF visibility binding not playing well with data trigger bound to visibility
body: <p>I can't figure out what the problem with this code is. Maybe you can spot something I don't see. My project builds just fine and the designer doesn't complain about anything. But, when I try to run it, it says that it can't create an instance of the window this code is in. </p>
  
  <p>I think I have narrowed the problem down to the visibility binding coordinating with the data trigger. If I remove the visibility binding on that property and set it arbitrarily to true or false, it runs just fine. But I need this property to be dynamic. </p>
  
  <pre><code>&lt;Image Visibility="{Binding ShowStatusMessageTabIcon, Converter={StaticResource BoolToVisibility}}"
     Source="{Binding Source={x:Static bo:UserSession.Instance}, Path=HighestStatusMessageSeverity, Converter={StaticResource SeverityToImageConverter}}"&gt;
  &lt;Image.Style&gt;
      &lt;Style&gt;
          &lt;Style.Triggers&gt;
              &lt;DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Visibility}"
                           Value="Visible"&gt;
                  &lt;DataTrigger.EnterActions&gt;
                      &lt;BeginStoryboard Storyboard="{StaticResource FlashErrorImage}" /&gt;
                  &lt;/DataTrigger.EnterActions&gt;
                  &lt;DataTrigger.ExitActions&gt;
                      &lt;RemoveStoryboard BeginStoryboardName="FlashErrorImage" /&gt;
                  &lt;/DataTrigger.ExitActions&gt;
              &lt;/DataTrigger&gt;
          &lt;/Style.Triggers&gt;
      &lt;/Style&gt;
  &lt;/Image.Style&gt;
  </code></pre>
  
  <p></p>