<Page
    x:Class="OData.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:OData"
    xmlns:c1="using:C1.Xaml.FlexGrid"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
          <Grid Margin="120 40 40 40">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition />
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <TextBlock x:Name="pageTitle" Text="FlexGrid OData" IsHitTestVisible="false" Style="{StaticResource PageHeaderTextStyle}" />
            <TextBlock Text="Select a category" Grid.Row="1" FontSize="16" Margin="0 10"/>
            <c1:C1FlexGrid Name="_flexCategories" 
                           AutoGenerateColumns="False" 
                           SelectionMode="Row" 
                           Grid.Row="2" 
                           HeaderGridLinesBrush="Transparent">
                <c1:C1FlexGrid.Columns>
                    <c1:Column Binding="{Binding CategoryName}" Width="*" />
                    <c1:Column Binding="{Binding Description}" Width="4*" />
                </c1:C1FlexGrid.Columns>
            </c1:C1FlexGrid>
            <TextBlock Text="Products" FontSize="16" Grid.Row="3" Margin="0 10"/>
            <c1:C1FlexGrid Name="_flexProducts" 
                           AutoGenerateColumns="False" 
                           SelectionMode="RowRange" 
                           Grid.Row="4" 
                           HeaderGridLinesBrush="Transparent" >
                <c1:C1FlexGrid.Columns>
                    <c1:Column Binding="{Binding ProductName}" Width="3*" />
                    <c1:Column Binding="{Binding QuantityPerUnit}" Width="3*" />
                    <c1:Column Binding="{Binding UnitPrice}" Width="*" />
                    <c1:Column Binding="{Binding UnitsInStock}" Width="*" />
                    <c1:Column Binding="{Binding ReorderLevel}" Width="*" />
                    <c1:Column Binding="{Binding UnitsOnOrder}" Width="*" />
                    <c1:Column Binding="{Binding Discontinued}" Width="*" />
                </c1:C1FlexGrid.Columns>
            </c1:C1FlexGrid>
            <ProgressRing x:Name="categoryLoader" Grid.Row="2" Width="50" Height="50" />
            <ProgressRing x:Name="productLoader" Grid.Row="4" Width="50" Height="50" Visibility="Collapsed" />
        </Grid>
    </Grid>
</Page>
