<UserControl x:Class="HistoryView.Controls.Configs.Mini8Comparision"
             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"
             mc:Ignorable="d" 
             x:Name="This"
             d:DesignHeight="450" d:DesignWidth="800">
    <Grid>
        <ItemsControl x:Name="Items" ItemsSource="{Binding ElementName=This, Path=Comparision}">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Border BorderBrush="{StaticResource DarkBorderColor}" BorderThickness="0,0,0,1">
                        <Grid Margin="8">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="0"/>
                                <RowDefinition Height="auto"/>
                            </Grid.RowDefinitions>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="auto"/>
                                    <ColumnDefinition Width="8"/>
                                    <ColumnDefinition/>
                                </Grid.ColumnDefinitions>
                                <TextBlock VerticalAlignment="Center" Width="80" FontSize="15" FontWeight="Bold" TextWrapping="Wrap">
                                    <Run Text="{DynamicResource ComparisionSource}"/>
                                    <Run>:</Run>
                                </TextBlock>
                                <local:ChannelComparision Grid.Column="2" Source="{Binding Value.Source}" Margin="0,4"/>
                            </Grid>

                            <Grid Grid.Row="2">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="auto"/>
                                    <ColumnDefinition Width="8"/>
                                    <ColumnDefinition/>
                                </Grid.ColumnDefinitions>
                                <TextBlock VerticalAlignment="Center" Width="80" FontSize="15" FontWeight="Bold" TextWrapping="Wrap">
                                      <Run Text="{DynamicResource ComparisionTarget}"/>
                                      <Run>:</Run>
                                </TextBlock>
                                <local:ChannelComparision Grid.Column="2" Source="{Binding Value.Target}" Target="{Binding Value.Source}" Margin="0,4"/>
                            </Grid>
                        </Grid>
                    </Border>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Vertical"/>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
    </Grid>
</UserControl>
