title: How to add a trigger to a WPF custom control without overriding the existing style?
body: <p>I am creating a simple custom control extending from toggle button that allows the user to specify checked and unchecked content directly in XAML.  It works well but it is based on a trigger, and I don't know how to define the trigger except in a style.  If I define the style, then I lose anything set outside of the custom control.</p>
  
  <p>What I would like to be able to do is just append this trigger to any existing style set elsewhere on the control.</p>
  
  <p>Here's the XAML for the style/trigger.</p>
  
  <pre><code>&lt;ToggleButton.Style&gt;
      &lt;Style TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}"&gt;
          &lt;Setter Property="Content" Value="{Binding RelativeSource={RelativeSource Self}, Path=UncheckedContent}" /&gt;
          &lt;Style.Triggers&gt;
              &lt;Trigger Property="IsChecked" Value="True"&gt;
                  &lt;Setter Property="Content"
                          Value="{Binding RelativeSource={RelativeSource Self}, Path=CheckedContent}" /&gt;
              &lt;/Trigger&gt;
          &lt;/Style.Triggers&gt;
      &lt;/Style&gt;
  &lt;/ToggleButton.Style&gt;
  </code></pre>
  
  <p>I tried inheriting the style via the BasedOn with a default type but it won't work if the custom control has an explicit style set by its parent.  I also considered EventTriggers but I do not believe there would be an event to initialize the control.  </p>
  
  <p>Thanks for any help anyone can offer. :)</p>