There are a couple of ways you can achieve this and while neither of these are good ways of doing it technically, they should keep you moving. I'm going to assume you are familiar with an MVVM paradigm (if not just search "MVVM WPF").
Without a grid View
If you are happy to display your data in columns without necessarily using a gridview. For example you can simply use a list box and set your items source to an IEnumerable and supply a list of differnt typed values. The final can be your summary row. Just supply a for each type and you end up with different row formats. i.e.
return ((IEnumerable<object>)model.Pairs)
.Concat(new SummaryRow(model.Pairs));
And the XAML
<ListBox Grid.IsSharedSizeScope ItemsSource={Binding}>
<ListBox.Resources>
<DataTemplate DataType="{x:Type IntPair}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="XColumn"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="YColumn"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding VarX}">
<TextBlock Grid.Column="1" Text="{Binding VarY}">
</Grid>
</DataTemplate>
<DataTemplate DataType="{x:Type SummaryRow}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="XColumn"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="YColumn"/>
</Grid.ColumnDefinitions>
<TextBlock Text="The sum is:">
<TextBlock Grid.Column="1" Text="{Binding Total}">
</Grid>
</DataTemplate>
</ListBox.Resources>
</ListBox>
With a GridView
Alternatively just use a ViewModel to supply an IEnumerable. So your model might have an IEnumerable, and you could do something as simple as
return (from x in model.Pairs
select new ConvertedResults
{
VarX = x.IntX.ToString(),
VarY = x.IntY.ToString()
})
.Concat(new [] { new ConvertedResults
{
VarX = "The sum is:",
VarY = (from y in model.Pairs select x.VarX).Sum().ToString()
});