title: XAML trigger as StaticResource
body: <p>Why can't I create a trigger and use it as a static resource in XAML?</p>
  
  <pre><code>&lt;Window.Resources&gt;
      &lt;Trigger x:Key="ValidationTrigger" x:Shared="False" Property="Validation.HasError" Value="true"&gt;
          &lt;Setter Property="FrameworkElement.ToolTip"
                  Value="{Binding RelativeSource={x:Static RelativeSource.Self},
                  Path=(Validation.Errors)/ErrorContent}"/&gt;
      &lt;/Trigger&gt;
  
      &lt;Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}"&gt;
          &lt;Style.Triggers&gt;
              &lt;StaticResource ResourceKey="ValidationTrigger"/&gt;
          &lt;/Style.Triggers&gt;
      &lt;/Style&gt;
  &lt;/Window.Resources&gt;
  </code></pre>
  
  <p>I get an errormessage at runtime<br>
  "Value cannot be null.<br>
  Parameter name: triggerBase  Error at object 'System.Windows.Markup.StaticResourceHolder' in markup file"</p>