<Page x:Class="FlexGrid101.RowDetails"
      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" 
      d:DesignHeight="450" d:DesignWidth="800"
      xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" 
      Title="RowDetails">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Margin="10">
            <Label x:Name="lblMode" VerticalAlignment="Center"/>
            <ComboBox x:Name="showItemsPicker" HorizontalAlignment="Stretch"/>
        </StackPanel>
        <c1:C1FlexGrid x:Name="grid" Grid.Row="2" AutoGenerateColumns="False" HeadersVisibility="All" SelectionMode="Row">
            <c1:C1FlexGrid.Columns>
                <c1:Column Binding="{Binding Id}" Width="Auto"/>
                <c1:Column Binding="{Binding FirstName}" Width="*"/>
                <c1:Column Binding="{Binding LastName}" Width="*"/>
            </c1:C1FlexGrid.Columns>
            <c1:C1FlexGrid.RowDetailsTemplate>
                    <DataTemplate>
                        <Grid Margin="3">
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition />
                                <RowDefinition />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Label Content="Country:"/>
                            <Label Content="{Binding Country}" Grid.Column="1"/>
                            <Label Content="City:" Grid.Row="1"/>
                            <Label Content="{Binding City}" Grid.Row="1" Grid.Column="1"/>
                            <Label Content="Address:" Grid.Row="2"/>
                            <Label Content="{Binding Address}" Grid.Row="2" Grid.Column="1"/>
                            <Label Content="PostalCode:" Grid.Row="3"/>
                            <Label Content="{Binding PostalCode}" Grid.Row="3" Grid.Column="1"/>
                        </Grid>
                    </DataTemplate>
            </c1:C1FlexGrid.RowDetailsTemplate>
        </c1:C1FlexGrid>
    </Grid>
</Page>
