<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:BoxOfficeDashboard"
    xmlns:vm="using:BoxOfficeDashboard.ViewModels"
    xmlns:v="using:BoxOfficeDashboard.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Xaml="using:C1.Xaml"
    x:Class="BoxOfficeDashboard.MainPage"
    mc:Ignorable="d">
    <Page.DataContext>
        <vm:ViewModel />
    </Page.DataContext>

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Margin="40,0,30,40">
            <TextBlock Text="Studio Market Share" Style="{StaticResource HeaderTextBlockStyle}" VerticalAlignment="Bottom" />
            <TextBlock Text="Powered by" Style="{StaticResource SubheaderTextBlockStyle}" Margin="20 0 10 0" VerticalAlignment="Bottom"/>
            <TextBlock Text="BoxOffice" Style="{StaticResource SubheaderTextBlockStyle}" FontFamily="Impact" VerticalAlignment="Bottom"/>
            <TextBlock Text="Mojo" Style="{StaticResource SubheaderTextBlockStyle}" FontFamily="Impact" Margin="2 0" Foreground="#FFAE0000" VerticalAlignment="Bottom"/>
            <TextBlock Text=".com" Style="{StaticResource SubheaderTextBlockStyle}" FontFamily="Impact" VerticalAlignment="Bottom"/>

        </StackPanel>
        
        <Xaml:C1TabControl ItemsSource="{Binding StudiosByYear}" CanUserReorder="False" Grid.Row="1" Padding="40, 0, 40, 46" BorderThickness="0" >
            <Xaml:C1TabControl.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding [0].Year}" Style="{StaticResource SubheaderTextBlockStyle}" Margin="0 0 0 10" Width="80" TextAlignment="Center"/>
                </DataTemplate>
            </Xaml:C1TabControl.ItemTemplate>
            <Xaml:C1TabControl.ContentTemplate>
                <DataTemplate>
                    <v:DashboardView Margin="0 20 0 0" />
                </DataTemplate>
            </Xaml:C1TabControl.ContentTemplate>
        </Xaml:C1TabControl>

    </Grid>
</Page>
