title: Binding for a GroupBox HeaderTemplate with MVVM
body: <p>I want to create a GroupBox with a custom header, where besides the header title, i want to have an icon that is associated with a certain MVVM binding.</p>
  
  <p>For example i got it working using this approach:</p>
  
  <p><strong>View:</strong></p>
  
  <pre><code>&lt;GroupBox&gt;
      &lt;GroupBox.Header&gt;
          &lt;StackPanel Orientation="Horizontal"&gt;
              &lt;Image Height="18" VerticalAlignment="Center" Source="{Binding BondHead2Enabled, Converter={StaticResource StateToIconConverter}}" /&gt;
              &lt;Label Content="Bond Head 2"/&gt;
          &lt;/StackPanel&gt;
      &lt;/GroupBox.Header&gt;
      &lt;finalBondView:BondheadTemplateView Content="{Binding BondHead2Content}"/&gt;
  &lt;/GroupBox&gt;
  </code></pre>
  
  <p><strong>ViewModel</strong></p>
  
  <pre><code>public bool BondHead2Enabled =&gt; false;
  
  public BondHeadTemplateViewModel BondHead2Content
  {
      get { return _bondheadContents[1]; }
      set
      {
          if (_bondheadContents[1] != value &amp;&amp; value != null)
          {
              _bondheadContents[1] = value;
              RaisePropertyChanged("BondHead2Content");
          }
      }
  }
  </code></pre>
  
  <p>However with this approach i have to repeat a lot of code on each groupbox i have. So i want to turn this into a Header Template where i can just associate a style instead of copy pasting the header. 
  Therefore i created this style:</p>
  
  <p><strong>Style</strong></p>
  
  <pre><code>&lt;Style x:Key="StatusGroupBox" TargetType="{x:Type GroupBox}"&gt;
      &lt;Setter Property="HeaderTemplate"&gt;
          &lt;Setter.Value&gt;
              &lt;DataTemplate&gt;
                  &lt;StackPanel Orientation="Horizontal"&gt;
                      &lt;Image Height="18" VerticalAlignment="Center" Source="{Binding EnabledStatus, RelativeSource={RelativeSource AncestorType=GroupBox}, Converter={StaticResource StateToIconConverter}}" /&gt;
                      &lt;Label Content="{Binding Header, RelativeSource={RelativeSource AncestorType=GroupBox}}"/&gt;
                  &lt;/StackPanel&gt;
              &lt;/DataTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p><strong>ViewModel</strong></p>
  
  <pre><code>&lt;GroupBox Header="Bond Head 3" Margin="5" Style="{DynamicResource StatusGroupBox}"&gt;
      &lt;finalBondView:BondheadTemplateView Content="{Binding BondHead3Content}"/&gt;
  &lt;/GroupBox&gt;
  </code></pre>
  
  <p>I can get the content for the label using this style, but i can't get the boolean value that i need to know which icon to display, named <em>EnabledStatus</em> in the style. So how can i <em>pass</em> this information to te style in a generic way?</p>