<UserControl x:Class="MainTestApplication.iTunes"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:MainTestApplication"
             xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml">
    <Grid Background="White">
        <Grid.Resources>
            <Style x:Key="gridStyle" TargetType="Control">
                <Setter Property="BorderBrush" Value="#FFA3AEB9"/>
                <Setter Property="BorderThickness" Value="1"/>
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition />
			<ColumnDefinition Width="Auto"/>
		</Grid.ColumnDefinitions>
		<Grid Margin="0,0,0,10" Grid.Row="1">
			<Grid.ColumnDefinitions>
				<ColumnDefinition/>
				<ColumnDefinition Width="Auto"/>
			</Grid.ColumnDefinitions>
			<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
				<TextBlock Text="Media Library: "/>
				<TextBlock x:Name="_txtSongs" Text="Songs"/>
			</StackPanel>
			<local:SearchBox Margin="10 0 0 0" Grid.Column="1" x:Name="_srchTunes" HorizontalAlignment="Right" />
		</Grid>
		<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,0,10" Grid.ColumnSpan="2">
			<TextBlock Text="Show: " VerticalAlignment="Center"/>
			<Button x:Name="_btnShowArtists" Content="Artists" VerticalAlignment="Center" Width="80" Click="_btnShowArtists_Click" Margin="0,0,10,0" />
			<Button x:Name="_btnShowAlbums" Content="Albums" VerticalAlignment="Center" Width="80" Click="_btnShowAlbums_Click" Margin="0,0,10,0"  />
			<Button x:Name="_btnShowSongs" Content="Songs" VerticalAlignment="Center" Width="80" Click="_btnShowSongs_Click" Margin="0,0,10,0" />
			<CheckBox x:Name="_chkOwnerDraw" VerticalAlignment="Center" Content="Custom Cells " IsChecked="true" Click="_chkOwnerDraw_Click"/>
		</StackPanel>
		<!-- show songs in a FlexGrid -->
		<c1:C1FlexGrid x:Name="_flexiTunes" Grid.Row="2"
			Style="{StaticResource gridStyle}"
			IsReadOnly="true"
			AreRowGroupHeadersFrozen="False"
			HeadersVisibility="Column"
			GridLinesVisibility="None"
			Background="White"
			RowBackground="White"
			AlternatingRowBackground="White"
			GroupRowBackground="White"
			MinColumnWidth="30"
			SelectionMode="ListBox"
			SelectionBackground="#a0eaeff4"
			CursorBackground="#ffeaeff4"
			AutoGenerateColumns="False" >
			<c1:C1FlexGrid.Columns>
				<c1:Column Binding="{Binding Name}" Header="Title" AllowDragging="False" Width="300" />
				<c1:Column Binding="{Binding Duration}" HorizontalAlignment="Right" />
				<c1:Column Binding="{Binding Size}" HorizontalAlignment="Right" />
				<c1:Column Binding="{Binding Rating, Mode=TwoWay}" HorizontalAlignment="Left" Width="200" />
			</c1:C1FlexGrid.Columns>
		</c1:C1FlexGrid>
	</Grid>
</UserControl>
