<Window x:Class="RadGridView_WPF_AR_1.MainWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
		xmlns:my="clr-namespace:RadGridView_WPF_AR_1"
		Title="MainWindow" Height="700" Width="700">
	<Window.Resources>
		<my:MyViewModel x:Key="MyViewModel"/>
	</Window.Resources>
	<Grid DataContext="{StaticResource MyViewModel}">
		<telerik:RadGridView Grid.Row="0" 
							 Name="clubsGrid" 
							 ItemsSource="{Binding Clubs}"
							 SelectionMode="Extended"
							 ClipboardCopyMode="All"
							 ShowColumnFooters="True"
							 AutoGenerateColumns="False"
							 Margin="5">
			<telerik:RadGridView.Columns>
				<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Footer="My Column Footer" />
				<telerik:GridViewDataColumn DataMemberBinding="{Binding Established}"
											Header="Est." 
											DataFormatString="{}{0:yyyy}">
					<telerik:GridViewDataColumn.AggregateFunctions>
						<telerik:CountFunction Caption="Count: " />
					</telerik:GridViewDataColumn.AggregateFunctions>
				</telerik:GridViewDataColumn>
				<telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}" 
											Header="Stadium" 
											DataFormatString="{}{0:N0}">
					<telerik:GridViewDataColumn.AggregateFunctions>
						<telerik:SumFunction Caption="Sum: " />
					</telerik:GridViewDataColumn.AggregateFunctions>
					<telerik:GridViewDataColumn.FooterCellStyle>
						<Style  TargetType="telerik:GridViewFooterCell">
							<Setter Property="Content">
								<Setter.Value>
									<StackPanel>
										<telerik:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center">
											<ItemsControl.ItemTemplate>
												<DataTemplate>
													<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
														<TextBlock VerticalAlignment="Center" Text="{Binding Caption}" />
														<TextBlock VerticalAlignment="Center" Text="{Binding FormattedValue}" />
													</StackPanel>
												</DataTemplate>
											</ItemsControl.ItemTemplate>
											<ItemsControl.ItemsPanel>
												<ItemsPanelTemplate>
													<StackPanel Orientation="Vertical" />
												</ItemsPanelTemplate>
											</ItemsControl.ItemsPanel>
										</telerik:AggregateResultsList>
									</StackPanel>
								</Setter.Value>
							</Setter>
						</Style>
					</telerik:GridViewDataColumn.FooterCellStyle>
				</telerik:GridViewDataColumn>
			</telerik:RadGridView.Columns>
		</telerik:RadGridView>	
	</Grid>
</Window>
