<UserControl x:Class="ConfigFileManager.Controls.HarewareCompare"
             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:ConfigFileManager.Controls"
             mc:Ignorable="d" 
             x:Name="This"
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <ResourceDictionary Source="/UICommon;component/Resources.xaml"/>
    </UserControl.Resources>
    <Border BorderBrush="{StaticResource DarkBorderColor}" BorderThickness="0,0,0,1">

        <Grid Margin="0,4">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="180"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="auto"/>
            </Grid.ColumnDefinitions>

            <TextBlock Text="{Binding ElementName=This, Path=Target.DeviceName}" FontSize="14" VerticalAlignment="Center"></TextBlock>

            <StackPanel Grid.Column="2" Orientation="Horizontal">
                <Image x:Name="DeviceModelImage" Source="{StaticResource Icon_finish}" VerticalAlignment="Center" Width="22"/>
                <TextBlock FontSize="14" VerticalAlignment="Center" Margin="4,0" Text="{Binding ElementName=This, Path=Target.DeviceModel}"/>
            </StackPanel>
            <StackPanel Grid.Column="4" Orientation="Horizontal">
                <Image x:Name="DeviceSubModelImage" Source="{StaticResource Icon_finish}" VerticalAlignment="Center" Width="22"/>
                <TextBlock FontSize="14" VerticalAlignment="Center" Margin="4,0" Text="{Binding ElementName=This, Path=Target.DeviceSubModel}"/>
            </StackPanel>
            <StackPanel Grid.Column="6" Orientation="Horizontal">
                <Image x:Name="SoftwareVersionImage" Source="{StaticResource Icon_finish}" VerticalAlignment="Center" Width="22"/>
                <TextBlock FontSize="14" VerticalAlignment="Center" Margin="4,0" >
                <Run>Ver:</Run>
                <Run Text="{Binding ElementName=This, Path=Target.SoftwareVersion}"/>
                </TextBlock>
            </StackPanel>
            <Button Grid.Column="8" x:Name="Migrate" VerticalAlignment="Center" HorizontalAlignment="Center" Background="Transparent" 
                BorderBrush="{StaticResource ThemeColor}" Foreground="{StaticResource ThemeColor}"  Height="24" Width="80"
                Command="{Binding ElementName=This, Path=MigrateCommand}" CommandParameter="{Binding ElementName=This, Path=Target}">迁移 Config</Button>

            <Button Grid.Column="10" x:Name="MigrateRecipe" VerticalAlignment="Center" HorizontalAlignment="Center" Background="Transparent" 
                BorderBrush="{StaticResource ThemeColor}" Foreground="{StaticResource ThemeColor}" Height="24" Width="80"
                Command="{Binding ElementName=This, Path=MigrateRecipeCommand}" CommandParameter="{Binding ElementName=This, Path=Target}">迁移 Recipe</Button>
        </Grid>
    </Border>
</UserControl>
