<UserControl x:Class="HistoryView.Controls.Configs.TempConfigComparision"
             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" 
             xmlns:local="clr-namespace:HistoryView.Controls.Configs"
             xmlns:converter="clr-namespace:HistoryView.Converters"
             xmlns:resource="clr-namespace:HistoryView.Resources"
             mc:Ignorable="d" 
             x:Name="This"
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <converter:BoolBurshConverter2 x:Key="BrushConvert"/>
    </UserControl.Resources>
    <Grid Margin="8">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="8"/>
            <RowDefinition/>
        </Grid.RowDefinitions>

        <Grid Grid.Row="0" Margin="88,0,0,0" TextElement.FontSize="14" TextElement.FontWeight="Bold">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" Text="Index" />
            <TextBlock Grid.Column="2" VerticalAlignment="Center"  HorizontalAlignment="Center" Text="SetPoint" />
            <TextBlock Grid.Column="4" VerticalAlignment="Center"  HorizontalAlignment="Center" Text="CapsW" />
            <TextBlock Grid.Column="6" VerticalAlignment="Center"  HorizontalAlignment="Center" Text="FloorW"/>
            <TextBlock Grid.Column="8" VerticalAlignment="Center"  HorizontalAlignment="Center" Text="Caps"/>
            <TextBlock Grid.Column="10" VerticalAlignment="Center" HorizontalAlignment="Center"  Text="Floor"/>
            <TextBlock Grid.Column="12" VerticalAlignment="Center" HorizontalAlignment="Center"  Text="P"/>
            <TextBlock Grid.Column="14" VerticalAlignment="Center" HorizontalAlignment="Center"  Text="I"/>
            <TextBlock Grid.Column="16" VerticalAlignment="Center" HorizontalAlignment="Center"  Text="D"/>
            <TextBlock Grid.Column="18" VerticalAlignment="Center" HorizontalAlignment="Center"  Text="Up"/>
            <TextBlock Grid.Column="20" VerticalAlignment="Center" HorizontalAlignment="Center"  Text="Down"/>
            <TextBlock Grid.Column="22" VerticalAlignment="Center" HorizontalAlignment="Center"  Text="Mode"/>
        </Grid>
        <resource:TouchableScrollViewer Grid.Row="2" VerticalScrollBarVisibility="Hidden">
            <ItemsControl x:Name="Items" ItemsSource="{Binding ElementName=This, Path=Comparision}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Expander Style="{StaticResource ExpanderStyle1}">
                            <Expander.Header>
                                <Border  Background="{Binding Value.IsSame, Converter={StaticResource BrushConvert}}" CornerRadius="4" Margin="4">
                                    <TextBlock Margin="4,8">
                                        <Run>Mini8 No.</Run>
                                        <Run Text="{Binding Value.Index}"/>
                                    </TextBlock>
                                </Border>
                            </Expander.Header>
                            <local:Mini8Comparision Source="{Binding Value.Source}" Target="{Binding Value.Target}" Margin="0,0"/>
                        </Expander>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </resource:TouchableScrollViewer>
    </Grid>
</UserControl>
