title: Having one data trigger for multiple controls
body: <p>I want to have one Style DataTrigger inside my window.resources that can be used for multiple expanders. The DataTrigger is bound to an enum value inside my ViewModel, and based on the enum value, I want the the correct expanders to be collapsed. For example: If the enum value is set to "A" then I want only the expander associated with type "A" to be visible, and the rest of the expanders to become collapsed.</p>
  
  <p>I was thinking of something like this:</p>
  
  <pre><code>    &lt;Style TargetType="{x:Type Expander}"&gt;
          &lt;Style.Triggers&gt;
              &lt;DataTrigger Binding="{Binding Type}" Value="A"&gt;
                  // In here i would set the expander associated w/ "A" to Visible 
                  // and have the rest of the expanders collapsed. Since TargetName is 
                  // not allowed within a "Setter" property of a style, I am not sure on how to accomplish this.
              &lt;/DataTrigger&gt;
              &lt;DataTrigger Binding="{Binding Type}" Value="B"&gt;
                 // Same concept as above
              &lt;/DataTrigger&gt;
          &lt;/Style.Triggers&gt;
      &lt;/Style&gt;
  </code></pre>