title: Display sum of grouped items in ListView
body: <p>I'm creating a WPF TimeCard app using the MVVM design pattern, and I'm trying to display the sum (total) hours the user has clocked in grouped by each day.  I have a ListView with all of the TimeCard data broken into groups using the following XAML:</p>
  
  <pre><code>&lt;ListView.GroupStyle&gt;
      &lt;GroupStyle ContainerStyle="{StaticResource GroupItemStyle}"&gt;
          &lt;GroupStyle.HeaderTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;StackPanel Orientation="Horizontal"&gt;
                      &lt;TextBlock Text="{Binding Path=Name, StringFormat=\{0:D\}}" FontWeight="Bold"/&gt;
                      &lt;TextBlock Text="  (" FontWeight="Bold"/&gt;
                      &lt;!-- This needs to display the sum of the hours --&gt;
                      &lt;TextBlock Text="{Binding ???}" FontWeight="Bold"/&gt;
                      &lt;TextBlock Text=" hours)" FontWeight="Bold"/&gt;
                  &lt;/StackPanel&gt;
              &lt;/DataTemplate&gt;
          &lt;/GroupStyle.HeaderTemplate&gt;
      &lt;/GroupStyle&gt;
  &lt;/ListView.GroupStyle&gt;
  </code></pre>
  
  <p>Is this even possible?  At first I thought I would create a partial class of the CollectionViewGroup and add my own properties.  But I'm not sure this will even work.  Perhaps there is a better solution... any suggestions?</p>