<UserControl x:Class="TutorialsSilverlight.CustomColumns"
    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"
    mc:Ignorable="d"
    d:DesignHeight="554" d:DesignWidth="943" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <!-- The RiaViewSource in this C1DataSource is a used as a base for a live view with custom fields defined in code. -->
        <c1:C1DataSource Name="c1DataSource1" DomainContextTypeName="TutorialsSilverlight.Web.DomainService1">
            <c1:RiaViewSource QueryName="GetProducts" />
        </c1:C1DataSource>

        <sdk:DataGrid AutoGenerateColumns="True" Name="dataGrid1"/>

        <!-- A button that adds a new product. -->
        <StackPanel Margin="4" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button Width="70" Margin="4,0,0,0" x:Name="addItem">Add</Button>
            <Button Width="70" Margin="4,0,0,0" x:Name="deleteItem">Delete</Button>
        </StackPanel>
    </Grid>
</UserControl>
