<Window xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"  x:Class="LabResults.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:LabResults"
        Title="LabResults FlexGrid Application" Height="350" Width="525" WindowState="Maximized">
    <Window.Resources>
        <local:ViewModel x:Key="_vm" />
    </Window.Resources>
    <Grid x:Name="LayoutRoot" 
        Background="White"
        DataContext="{StaticResource _vm}">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Margin="12">
            <TextBlock 
                Text="Patient: " 
                VerticalAlignment="Center" />
            <ComboBox
                ItemsSource="{Binding Patients}" 
                SelectedItem="{Binding SelectedPatient, Mode=TwoWay}"
                Width="200" />
            <TextBlock 
                Text="{Binding Patients.Count, StringFormat=' # of clients: {0}'}" 
                VerticalAlignment="Center" />
        </StackPanel>
        <c1:C1FlexGrid 
            ItemsSource="{Binding TestResults}" 
            AutoGenerateColumns="False" 
            RowBackground="Transparent"
            AlternatingRowBackground="Transparent"
            Grid.Row="1" >
            <c1:C1FlexGrid.Columns>
                <c1:Column Binding="{Binding TestName}" Header="Test Name" Width="*"/>
                <c1:Column Binding="{Binding Result, Mode=TwoWay}" Header="Test Results" Width="*"/>
                <c1:Column Binding="{Binding Corrected, Mode=TwoWay}" Header="Corrected" Width=".5*"/>
            </c1:C1FlexGrid.Columns>
        </c1:C1FlexGrid>

    </Grid>
</Window>
