<UserControl x:Class="DataSourceSamples.C1FlexGridLargeDataSet"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:DataSourceSamples">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <c1:C1DataSource Name="c1DataSource1" ContextType="local:NORTHWNDEntities">
            <!-- An EntityViewSource of Order Details in Virtual Mode. -->
            <c1:EntityViewSource EntitySetName="Order_Details" PageSize="50" VirtualMode="Managed"/>
        </c1:C1DataSource>
        <TextBlock Text="Drag the scroll thumb quickly to see Virtual Mode in action!" TextWrapping="Wrap"/>
        <c1:C1FlexGrid Grid.Row="1" AutoGenerateColumns="False" Margin="10" Name="dataGrid1" ItemsSource="{Binding ElementName=c1DataSource1, Path=Order_Details}">
            <!-- A control handler that manages virtual mode in this C1FlexGrid. -->
            <c1:C1DataSource.ControlHandler>
                <c1:ControlHandler VirtualMode="True" />
            </c1:C1DataSource.ControlHandler>
            <c1:C1FlexGrid.Columns>
                <c1:Column Header="Order ID" Binding="{Binding Order_ID}" />
                <c1:Column Header="Product ID" Binding="{Binding Product_ID}" />
                <c1:Column Header="Unit Price" Binding="{Binding Unit_Price}" Format="c2" Width="120"/>
                <c1:Column Header="Quantity" Binding="{Binding Quantity}" Width="120"/>
                <c1:Column Header="Discount" Binding="{Binding Discount}" Format="p2" Width="120"/>
                <c1:Column Header="Product Name" Binding="{Binding Product.Product_Name}" Width="220"/>
            </c1:C1FlexGrid.Columns>
        </c1:C1FlexGrid>
    </Grid>
</UserControl>
