title: Using a trigger property on a different type to the setter property on WPF style
body: <p>I wish to set the opacity of a set of images on my main window to 0.25 when a dependency property on the window itself is false and restore them when the dependency property is true. I have attempted to use a style trigger for this but ran into difficulty when the dependency property was on a different type to the opacity property. </p>
  
  <pre><code>    &lt;Window.Resources&gt;
          &lt;Style x:Key="IconEnabledStyle" TargetType="Image"&gt;
              &lt;Style.Triggers&gt;
                  &lt;!-- MenuOptionsEnabled is on main window. Opacity is on Image --&gt;
                  &lt;Trigger Property="MenuOptionsEnabled" Value="False"&gt;
                      &lt;Setter Property="Opacity" Value="0.25"&gt;&lt;/Setter&gt;
                  &lt;/Trigger&gt;
                  &lt;Trigger Property="MenuOptionsEnabled" Value="True"&gt;
                      &lt;Setter Property="Opacity" Value="1.0"&gt;&lt;/Setter&gt;
                  &lt;/Trigger&gt;
              &lt;/Style.Triggers&gt;
          &lt;/Style&gt;
      &lt;/Window.Resources&gt;
  </code></pre>
  
  <p>As you can see the Trigger property is on a different type to the Setter property. Is there a way to define the type for both Trigger and Setter property.</p>