title: Style trigger based on parent style property
body: <p>I want to have buttons with little icons as content. </p>
  
  <p>The icons are defined and stored in a <code>ResourceDictionary</code> like this:</p>
  
  <pre><code>&lt;Path x:Key="BackIcon" Data="F1 M 57,42L 57,34L 32.25,34L 42.25,24L 31.75,24L 17... "/&gt;
  &lt;Path x:Key="LoadFromFileIcon" Data="F1 M 48,39L 56,39L 56,49L 63.25,49L 52,60.2... "/&gt;
  &lt;Path x:Key="SaveToFileIcon" Data="F1 M 48,60L 56,60L 56,50L 63.25,50L 52,38.75L... "/&gt;
  </code></pre>
  
  <p>Since I also need to provide <code>Path.Fill</code>, <code>Path.Stretch</code> etc. properties, I decided to make my own <code>IconButtonStyle</code> so I won't have to repeat the same attribute in every <code>Path</code> in the icon dictionary and make buttons very easily like this:</p>
  
  <pre><code>&lt;Button Style="{StaticResource IconButtonStyle}"
      Content="{StaticResource ResetIcon}"/&gt;
  </code></pre>
  
  <p>This is what I came up with:</p>
  
  <pre><code>&lt;Style x:Key="IconButtonStyle" TargetType="Button"&gt;
      &lt;Style.Resources&gt;
          &lt;Style TargetType="Path"&gt;
              &lt;Setter Property="Fill" Value="Black"/&gt; &lt;!-- Default path fill. --&gt;
  
              &lt;Style.Triggers&gt;
                  &lt;!-- How can I set path fill to "Red" based on the parent Button IsEnabled property? --&gt;
              &lt;/Style.Triggers&gt;
          &lt;/Style&gt;
      &lt;/Style.Resources&gt;
  
      &lt;Style.Triggers&gt;
          &lt;Trigger Property="IsEnabled" Value="false"&gt;
              &lt;!-- ?? --&gt;
          &lt;/Trigger&gt;
      &lt;/Style.Triggers&gt;
  
  &lt;/Style&gt;
  </code></pre>
  
  <p>My custom icon buttons have default path style defined via <code>Style.Resources</code>. Setting default path fill is easy but I can't figure out how to set a trigger that'll change path's fill to red when the owner button is disabled.</p>
  
  <p>Is it even possible?</p>