<Page
    x:Class="BasicLibrarySamples.TabControlSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:BasicLibrarySamples"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:c1="using:C1.Xaml"
    mc:Ignorable="d">

    <Grid>
        <Grid.Resources>
            <Style TargetType="Image" x:Key="TreeIcon">
                <Setter Property="Width" Value="22" />
                <Setter Property="Height" Value="22" />
                <Setter Property="Margin" Value="8 0" />
            </Style>
            <Style TargetType="TextBlock" x:Key="TreeText">
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <StackPanel Orientation="Horizontal" Height="50" Margin="0 0 10 0">
            <TextBlock Text="{Binding TabControlSample_TB_1_Text,Source={StaticResource BasicLibrarySamplesLocalization}}" VerticalAlignment="Center" FontSize="16" Width="110" />
            <ComboBox x:Name="cmbTabItemClose" Height="30" VerticalAlignment="Center"  Width="130" SelectionChanged="cmbTabItemClose_SelectionChanged">
                <ComboBoxItem Content="{Binding TabControlSample_ComboBox_Item1_Content,Source={StaticResource BasicLibrarySamplesLocalization}}" />
                <ComboBoxItem IsSelected="True" Content="{Binding TabControlSample_ComboBox_Item2_Content,Source={StaticResource BasicLibrarySamplesLocalization}}" />
                <ComboBoxItem Content="{Binding TabControlSample_ComboBox_Item3_Content,Source={StaticResource BasicLibrarySamplesLocalization}}" />
            </ComboBox>
        </StackPanel>
        <StackPanel x:Name="tabStripOverlapPanel" Orientation="Horizontal" Height="50" Grid.Column="1" Margin="0 0 10 0">
            <TextBlock Text="{Binding TabControlSample_TB_2_Text,Source={StaticResource BasicLibrarySamplesLocalization}}" VerticalAlignment="Center" FontSize="16" Width="140" />
            <Slider Width="120" Height="50" Maximum="10" VerticalAlignment="Center" Minimum="0" Value="{Binding ElementName=tabControl, Path=TabStripOverlap, Mode=TwoWay}" />
        </StackPanel>

        <c1:C1TabControl x:Name="tabControl" 
                         Grid.Row="2" 
                         Grid.ColumnSpan="3" 
                         TabItemShape="Sloped"
                         TabStripOverlapDirection="Left"  
                         TabStripOverlap="8" 
                         TabItemClose="InEachTab" 
                         TabStripMenuVisibility="Visible"
                         d:IsHidden="True">
            <c1:C1TabItem CanUserPin="True">
                <c1:C1TabItem.Header>
                    <TextBlock x:Name="perMonthTb" Text="{Binding TabControlSample_TabItem1_TB_Header_Text,Source={StaticResource BasicLibrarySamplesLocalization}}" />
                </c1:C1TabItem.Header>
                <local:SalesPerMonth />
            </c1:C1TabItem>
            <c1:C1TabItem CanUserPin="True">
                <c1:C1TabItem.Header>
                    <TextBlock x:Name="perSalesAgentTb" Text="{Binding TabControlSample_TabItem2_TB_Header_Text,Source={StaticResource BasicLibrarySamplesLocalization}}" />
                </c1:C1TabItem.Header>
                <local:SalesPerAgents/>
            </c1:C1TabItem>
            <c1:C1TabItem CanUserPin="True">
                <c1:C1TabItem.Header>
                    <TextBlock x:Name="salesAgentsTb" Text="{Binding TabControlSample_TabItem3_TB_Header_Text,Source={StaticResource BasicLibrarySamplesLocalization}}" />
                </c1:C1TabItem.Header>
                <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" BorderThickness="0" Background="Transparent" Margin="0" Padding="0">
                    <local:SalesAgents />
                </ScrollViewer>
            </c1:C1TabItem>
            <c1:C1TabItem CanUserPin="True">
                <c1:C1TabItem.Header>
                    <TextBlock x:Name="reportSummaryTb" Text="{Binding TabControlSample_TabItem4_TB_Header_Text,Source={StaticResource BasicLibrarySamplesLocalization}}" />
                </c1:C1TabItem.Header>
                <local:ReportSummary/>
            </c1:C1TabItem>
            <c1:C1TabItem CanUserPin="True">
                <c1:C1TabItem.Header>
                    <TextBlock x:Name="tab5Tb" Text="{Binding TabControlSample_TabItem5_TB_Header_Text,Source={StaticResource BasicLibrarySamplesLocalization}}" />
                </c1:C1TabItem.Header>
                <ScrollViewer VerticalScrollBarVisibility="Auto" BorderThickness="0" Background="Transparent" Margin="0" Padding="0">
                    <TextBlock Text="{Binding TabControlSample_TabItem5_TB_Header_Text,Source={StaticResource BasicLibrarySamplesLocalization}}" TextWrapping="Wrap" FontSize="14" Margin="10 0"></TextBlock>
                </ScrollViewer>
            </c1:C1TabItem>
            <c1:C1TabItem CanUserPin="True">
                <c1:C1TabItem.Header>
                    <TextBlock x:Name="tab6Tb" Text="{Binding TabControlSample_TabItem6_TB_Header_Text,Source={StaticResource BasicLibrarySamplesLocalization}}" />
                </c1:C1TabItem.Header>
                <ScrollViewer VerticalScrollBarVisibility="Auto" BorderThickness="0" Background="Transparent" Margin="0" Padding="0">
                    <TextBlock Text="{Binding TabControlSample_TabItem6_TB_Content_Text,Source={StaticResource BasicLibrarySamplesLocalization}}" TextWrapping="Wrap" FontSize="14" Margin="10 0"></TextBlock>
                </ScrollViewer>
            </c1:C1TabItem>
        </c1:C1TabControl>
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup>
                <VisualState x:Name="WideLayout">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="540"/>
                    </VisualState.StateTriggers>
                </VisualState>
                <VisualState x:Name="NarrowLayout">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="0"/>
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="tabStripOverlapPanel.(Grid.Row)" Value="1"></Setter>
                        <Setter Target="tabStripOverlapPanel.(Grid.Column)" Value="0"></Setter>
                        <Setter Target="perMonthTb.FontSize" Value="10"></Setter>
                        <Setter Target="perSalesAgentTb.FontSize" Value="10"></Setter>
                        <Setter Target="salesAgentsTb.FontSize" Value="10"></Setter>
                        <Setter Target="reportSummaryTb.FontSize" Value="10"></Setter>
                        <Setter Target="tab5Tb.FontSize" Value="10"></Setter>
                        <Setter Target="tab6Tb.FontSize" Value="10"></Setter>
                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</Page>