title: WPF GroupBox HeaderTemplate and DataBinding
body: <p>I define a headertemplate into a wpf groupbox and the databinding doesn't work. I don't understand why.</p>
  
  <pre><code>&lt;GroupBox&gt;
  &lt;GroupBox.HeaderTemplate&gt;
              &lt;DataTemplate&gt;
              &lt;StackPanel Orientation="Horizontal" &gt;
                  &lt;Image Source="/PopuAssuNetApplication.UI.Control;component/Images/Members.png" Width="24" /&gt;
                  &lt;TextBlock VerticalAlignment="Center"&gt;
                                  &lt;TextBlock.Text&gt;
                                          &lt;MultiBinding StringFormat="{x:Static Member=resx:Resources.PersonsInContractGroupBox}"&gt; 
                                              &lt;Binding Path="CurrentContract.Federation" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type GroupBox}}"&gt;
                                              &lt;/Binding&gt;
                                              &lt;Binding Path="CurrentContract.Type" Converter="{StaticResource contractTypeConverter}" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type GroupBox}}"&gt;
                                              &lt;/Binding&gt;
                                              &lt;Binding Path="CurrentContract.Number" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type GroupBox}}"&gt;
                                              &lt;/Binding&gt;
                                          &lt;/MultiBinding&gt;
                                      &lt;/TextBlock.Text&gt;
                  &lt;/TextBlock&gt;
                  &lt;WpfComponent:WaitControl Margin="7,0,0,0" VerticalAlignment="Top" Width="24" Height="24" MarginCenter="4"&gt;
                      &lt;WpfComponent:WaitControl.Style&gt;
                          &lt;Style&gt;
                              &lt;Style.Triggers&gt;
                                  &lt;DataTrigger Binding="{Binding Path=IsMembersOfContractBusy, UpdateSourceTrigger=PropertyChanged, ElementName=PersonsInContract}" Value="true"&gt;
                                      &lt;Setter Property="WpfComponent:WaitControl.Visibility" Value="Visible" /&gt;
                                  &lt;/DataTrigger&gt;
                                  &lt;DataTrigger Binding="{Binding Path=IsMembersOfContractBusy, UpdateSourceTrigger=PropertyChanged, ElementName=PersonsInContract}" Value="false"&gt;
                                      &lt;Setter Property="WpfComponent:WaitControl.Visibility" Value="Collapsed" /&gt;
                                  &lt;/DataTrigger&gt;
                              &lt;/Style.Triggers&gt;
                          &lt;/Style&gt;
                      &lt;/WpfComponent:WaitControl.Style&gt;
                  &lt;/WpfComponent:WaitControl&gt;
              &lt;/StackPanel&gt;
                  &lt;/DataTemplate&gt;
          &lt;/GroupBox.HeaderTemplate&gt;
  </code></pre>
  
  <p></p>