<UserControl
  x:Class="Orders.EditProducts"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:local="clr-namespace:Orders"
  xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
  >
    <Grid Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <c1:C1DataSource Name="dataSource" ContextType="local:NORTHWNDEntities">
            <!-- An EntityViewSource of Products ordered by ProductID. -->
            <c1:EntityViewSource AutoLoad="True" EntitySetName="Products">
                <c1:EntityViewSource.SortDescriptors>
                    <c1:SortDescriptor PropertyPath="ProductID"/>
                </c1:EntityViewSource.SortDescriptors>
            </c1:EntityViewSource>
        </c1:C1DataSource>

        <!-- A DataGrid bound to the Product EntityViewSource defined above. -->
        <DataGrid Grid.Row="1" AutoGenerateColumns="True" ItemsSource="{Binding ElementName=dataSource, Path=Products}" Name="dataGrid1"/>
    </Grid>
</UserControl>