<UserControl
    x:Class="ControlExplorer.Controls.FlexGrid.MediaLibrary"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:CE.Samples.FlexGrid"
    xmlns:FlexGrid="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"
    d:DesignHeight="300"
    d:DesignWidth="400">
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock x:Name="_txtSongs" FontSize="16" Text="Songs" TextWrapping="Wrap" Margin="5"/>
        <!-- show songs in a FlexGrid -->
        <FlexGrid:C1FlexGrid x:Name="_flexMedia" Grid.Row="1"
                             IsReadOnly="true"
                             FontSize="16"
                             HeadersVisibility="Column"
                             GridLinesVisibility="None"
                             MinColumnWidth="35"
                             MinRowHeight="35"
                             SelectionMode="Row"
                             SelectionBackground="{StaticResource PhoneAccentBrush}"
                             CursorBackground="{StaticResource PhoneAccentBrush}"
                             AutoGenerateColumns="False"
                             BorderThickness="1">
            <FlexGrid:C1FlexGrid.Columns>
                <FlexGrid:Column Binding="{Binding Name}" Header="Title" AllowDragging="False" Width="300" />
                <FlexGrid:Column Binding="{Binding Duration}" />
                <FlexGrid:Column Binding="{Binding Size}"  />
                <FlexGrid:Column Binding="{Binding Rating, Mode=TwoWay}" Width="200" />
            </FlexGrid:C1FlexGrid.Columns>
        </FlexGrid:C1FlexGrid>

    </Grid>
</UserControl>
