title: Trying to add a trigger to a button to change the button's Content property
body: <p>I've got a UserControl that has a button on it.  The UserControl has a DependencyProperty called IsNew.  This is a bool value that is set to true if the object being edited in the control was newly created and hasn't been written to the database yet.  It is false otherwise.</p>
  
  <p>I've got a button that currently reads "Save".  I've been asked to change the button so it reads "Insert" if the row is new.  I now have the XAML below for the button:</p>
  
  <pre><code>&lt;Button Background="{DynamicResource ButtonBackground}" 
          Click="SaveButton_Click" 
          Content="Save" 
          FontSize="20" 
          FontWeight="Bold" 
          Foreground="{DynamicResource ButtonForeground}" 
          Height="60"
          IsEnabled="{Binding Path=IsDirty, RelativeSource={RelativeSource AncestorType={x:Type cs:Editor}}}"
          Margin="5"
          Name="SaveButton" 
          TabIndex="7"
          Visibility="{Binding Path=CanModify, Converter={StaticResource BoolToVisibility}}"&gt;
      &lt;Button.Triggers&gt;
          &lt;Trigger Property="Editor.IsNew" Value="True"&gt;
              &lt;Setter Property="Button.Content" Value="Insert" /&gt;
          &lt;/Trigger&gt;
          &lt;Trigger Property="Editor.IsNew&gt;
              &lt;Setter Property="Button.Content" Value="Save" /&gt;
          &lt;/Trigger&gt;
      &lt;/Button.Triggers&gt;
  &lt;/Button&gt;
  </code></pre>
  
  <p>I'm getting an exception at run time, whose inner exception reads:</p>
  
  <pre><code>Triggers collection members must be of type EventTrigger.
  </code></pre>
  
  <p>How do I get this to work?  I could do this easily in the code-behind, but I want to do it in the XAML.</p>
  
  <p>Thanks</p>
  
  <p>Tony</p>