<UserControl x:Class="PagingIPagedCollectionView.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Ria"
    xmlns:riaData="clr-namespace:System.Windows.Data;assembly=System.Windows.Controls.Ria"
    xmlns:services="clr-namespace:PagingIPagedCollectionView.Web.Services"
    xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
	<StackPanel x:Name="LayoutRoot" HorizontalAlignment="Left" VerticalAlignment="Top">
		<Grid Height="400" Width="400">
			<Grid.RowDefinitions>
				<RowDefinition Height="*"/>
				<RowDefinition Height="Auto"/>
			</Grid.RowDefinitions>

			<riaControls:DomainDataSource x:Name="invoicesDataSource" 
										  AutoLoad="True" 
										  QueryName="GetInvoicesQuery">
				<riaControls:DomainDataSource.DomainContext>
					<services:ChinookDomainContext/>
				</riaControls:DomainDataSource.DomainContext>
			</riaControls:DomainDataSource>
			<!--<Border Grid.Row="0" 
					BorderBrush="Black" 
					BorderThickness="1" 
					Margin="5">
				<telerikGrid:RadGridView Name="itemsControl" 
										 ItemsSource="{Binding Data, ElementName=invoicesDataSource}"/>
			</Border>-->
			<Border Grid.Row="0" 
					BorderBrush="Black" 
					BorderThickness="1" 
					Margin="5">
				<ListBox Name="itemsControl" 
						 ItemsSource="{Binding Data, ElementName=invoicesDataSource}"/>
			</Border>
			<Border Grid.Row="1" 
					BorderBrush="Black" 
					BorderThickness="1" 
					Margin="5">
				<telerikGrid:RadDataPager Name="radDataPager" 
										  Source="{Binding Data, ElementName=invoicesDataSource}"
										  PageSize="10"
										  IsTotalItemCountFixed="True"
										  DisplayMode="All"/>
			</Border>
		</Grid>
	</StackPanel>
</UserControl>
