<UserControl x:Class="SlnMesnac.WPF.Page.ProductDetails.DetailsEditControl"
             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:SlnMesnac.WPF.Page.ProductDetails"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800" Background="Transparent">
    <Grid  Margin="5,10">
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Border Grid.Column="0">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="3*"/>
                    <RowDefinition Height="2*"/>
                    <RowDefinition Height="5*"/>
                </Grid.RowDefinitions>
                <Border Grid.Row="0" Background="White" BorderBrush="White" BorderThickness="2" CornerRadius="3" Margin="10,10">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="3*"/>
                            <ColumnDefinition Width="5*"/>
                            <ColumnDefinition Width="2*"/>
                        </Grid.ColumnDefinitions>
                        <!--<Border Grid.Column="0" Background="Red" BorderBrush="#5B93EA" BorderThickness="2" CornerRadius="3" Margin="10,10"></Border>-->
                        <Border Grid.Column="0" Background="Transparent" BorderBrush="#5B93EA" BorderThickness="2" CornerRadius="3" Margin="10,10" MouseLeftButtonDown="ProductImage_MouseLeftButtonDown">
                            <Image Source="{Binding ProductImage}" Stretch="Uniform"/>
                        </Border>

                        <Border Grid.Column="1" Background="Transparent" CornerRadius="3" Margin="10,10">
                            <StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,10,0,0">
                                <Border Background="#1052AE" CornerRadius="5,5,5,0" Width="400" Height="40">
                                    <TextBox Text="{Binding ProductInfo.productSeries}" Foreground="White" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"/>
                                </Border>
                                <TextBox Text="{Binding ProductInfo.productName}" Foreground="Black" FontSize="24" Margin="0,20"/>

                                <Border Background="Transparent" CornerRadius="5" Width="150" Height="40" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,30,0,0">
                                    <Image Source="/Templates/image/certification.jpg" Stretch="Uniform"/>
                                </Border>

                            </StackPanel>
                        </Border>

                        <Border Grid.Column="2" Background="Transparent" CornerRadius="3" Margin="10,10">
                            <StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,10,0,0">
                                <Button Content="保存" Command="{Binding SavePrdouctInfoCommand }"/>
                            </StackPanel>
                        </Border>
                    </Grid>
                </Border>
                <Border Grid.Row="1" Background="White" BorderBrush="White" BorderThickness="2" CornerRadius="3" Margin="10,10">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="7*"/>
                            <ColumnDefinition Width="3*"/>
                        </Grid.ColumnDefinitions>
                        <StackPanel Grid.Column="0" Width="600" Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,10,0,0">
                            <Border Background="#E6EDF6" CornerRadius="18"  Height="40" Margin="0,10">
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                                    <TextBlock FontFamily="/Templates/fonts/font_5w2octy6l1q/#iconfont" Text="&#xe61d;" Foreground="#1550B7" FontSize="22" VerticalAlignment="Center" Margin="5,0,0,0"/>
                                    <TextBox  Text="{Binding ProductFeature[0].productFeature}" Width="500" Foreground="#1550B7" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                </StackPanel>
                            </Border>

                            <Border Background="#E6EDF6" CornerRadius="18"  Height="40" Margin="0,10">
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                                    <TextBlock FontFamily="/Templates/fonts/font_5w2octy6l1q/#iconfont" Text="&#xe61d;" Foreground="#1550B7" FontSize="22" VerticalAlignment="Center" Margin="5,0,0,0"/>
                                    <TextBox Text="{Binding ProductFeature[1].productFeature}" Width="500" Foreground="#1550B7" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                </StackPanel>
                            </Border>
                        </StackPanel>

                        <Border Grid.Column="1" Background="Transparent" BorderBrush="#5B93EA" BorderThickness="2" CornerRadius="3" Margin="10,10" MouseLeftButtonDown="FeatureImage_MouseLeftButtonDown">
                            <Image Source="{Binding FeatureImage}" Stretch="Uniform"/>
                        </Border>
                    </Grid>
                </Border>
                <Border Grid.Row="2" Background="White" BorderBrush="White" BorderThickness="2" CornerRadius="3" Margin="10,10">
                    <Grid Margin="10,10,10,0">
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <Border Grid.Row="0" BorderBrush="Green" BorderThickness="0">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="3*"/>
                                    <RowDefinition Height="6*"/>
                                </Grid.RowDefinitions>
                                <Border Grid.Row="0" BorderBrush="#1352B2" BorderThickness="10,0,0,0">
                                    <Border.Background>
                                        <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                                            <GradientStop Color="#D3DCF4" Offset="0.0"/>
                                            <GradientStop Color="#FFFFFF" Offset="1.0"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                    <TextBox Text="{Binding ProductDescribe[0].describeTitle}" Width="300" Foreground="#1550B7" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Center"  Margin="20,0,0,0"/>
                                </Border>
                                <TextBox  Grid.Row="1" Text="{Binding ProductDescribe[0].describeContent}" Width="800" TextWrapping="Wrap" FontSize="18"/>
                            </Grid>
                        </Border>

                        <Border Grid.Row="1" BorderBrush="Green" BorderThickness="0">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="3*"/>
                                    <RowDefinition Height="6*"/>
                                </Grid.RowDefinitions>
                                <Border Grid.Row="0" BorderBrush="#1352B2" BorderThickness="10,0,0,0">
                                    <Border.Background>
                                        <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                                            <GradientStop Color="#D3DCF4" Offset="0.0"/>
                                            <GradientStop Color="#FFFFFF" Offset="1.0"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                    <TextBox Text="{Binding ProductDescribe[1].describeTitle}" Width="300" Foreground="#1550B7" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Center"  Margin="20,0,0,0"/>
                                </Border>
                                <TextBox  Grid.Row="1" Text="{Binding ProductDescribe[1].describeContent}" Width="800" TextWrapping="Wrap" FontSize="18" />
                            </Grid>
                        </Border>

                        <Border Grid.Row="2" BorderBrush="Green" BorderThickness="0">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="3*"/>
                                    <RowDefinition Height="6*"/>
                                </Grid.RowDefinitions>
                                <Border Grid.Row="0" BorderBrush="#1352B2" BorderThickness="10,0,0,0">
                                    <Border.Background>
                                        <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                                            <GradientStop Color="#D3DCF4" Offset="0.0"/>
                                            <GradientStop Color="#FFFFFF" Offset="1.0"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                    <TextBox Text="{Binding ProductDescribe[2].describeTitle}" Width="300" Foreground="#1550B7" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Center"  Margin="20,0,0,0"/>
                                </Border>
                                <TextBox  Grid.Row="1" Text="{Binding ProductDescribe[2].describeContent}" Width="800" TextWrapping="Wrap" FontSize="18"/>
                            </Grid>
                        </Border>
                    </Grid>
                </Border>


            </Grid>
        </Border>

        <Border Grid.Column="1">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="4.5*"/>
                    <RowDefinition Height="6*"/>
                    <RowDefinition Height="4*"/>
                </Grid.RowDefinitions>
                <Border Grid.Row="0" Background="White" BorderBrush="White" BorderThickness="2" CornerRadius="3" Margin="10,10">
                    <Grid Margin="10,0,10,0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="2*"/>
                            <RowDefinition Height="9*"/>
                        </Grid.RowDefinitions>

                        <Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                            <Border Grid.Row="0" BorderBrush="#1352B2" BorderThickness="10,0,0,0">
                                <TextBlock Text="测试数据" Foreground="#1550B7" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Center"  Margin="20,0,0,0"/>
                            </Border>
                        </Border>

                        <Border Grid.Row="1" Background="Transparent" BorderBrush="#5B93EA" BorderThickness="2" CornerRadius="3" Margin="10,10" MouseLeftButtonDown="AnalyzeImage_MouseLeftButtonDown">
                            <Image Source="{Binding AnalyzeImage}" Stretch="Uniform"/>
                        </Border>

                    </Grid>
                </Border>
                <Border Grid.Row="1" Background="White" BorderBrush="White" BorderThickness="2" CornerRadius="3" Margin="10,10" >
                    <Grid Margin="10,0,10,0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="1*"/>
                            <RowDefinition Height="9*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>

                        <Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                            <Border Grid.Row="0" BorderBrush="#1352B2" BorderThickness="10,0,0,0">
                                <TextBlock Text="技术参数" Foreground="#1550B7" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Center"  Margin="20,0,0,0"/>
                            </Border>
                        </Border>
                        <Border Grid.Row="1" Grid.Column="0">
                            <!--<StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" x:Name="ParameterStackPanelLeft">
                                <TextBox Text="射频协议：符合ISO/IEC 15693" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="协议工作频率：13.56MHz士7KHz" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="识别距离：小于等于50mm" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="盘点速度：20ms/次" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>

                                <TextBox Text="输入电压：12-24VDC" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="发射功率:0.2W" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="最大功率：1W" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="通讯协议：Modbus RTU" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="通讯接口：RS485（M12-5针-B型-公头航空头）" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                            </StackPanel>-->

                            <StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" x:Name="ParameterStackPanelLeft">
                                <TextBox Text="{Binding ProductParams[0].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[1].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[2].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[3].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>

                                <TextBox Text="{Binding ProductParams[4].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[5].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[6].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[7].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[8].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                            </StackPanel>
                        </Border>
                        <Border Grid.Row="1" Grid.Column="1">
                            <StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" x:Name="ParameterStackPanelRight">
                                <TextBox Text="{Binding ProductParams[9].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[10].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[11].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[12].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>

                                <TextBox Text="{Binding ProductParams[13].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[14].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[15].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[16].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                                <TextBox Text="{Binding ProductParams[17].paramContent}" Width="380" Foreground="Gray" FontSize="14" TextWrapping="Wrap" Margin="0,5,0,0"/>
                            </StackPanel>
                        </Border>

                    </Grid>
                </Border>
                <Border Grid.Row="2" Background="Transparent" BorderBrush="Transparent" BorderThickness="0" CornerRadius="3" Margin="10,10">
                    <Grid>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Border Grid.Column="0" Background="White" BorderBrush="White" BorderThickness="2" Margin="0,0,5,0">
                            <Grid Margin="10,0,10,0">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="2*"/>
                                    <RowDefinition Height="9*"/>
                                </Grid.RowDefinitions>

                                <Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                                    <Border Grid.Row="0" BorderBrush="#1352B2" BorderThickness="10,0,0,0">
                                        <TextBlock Text="产品尺寸（mm）" Foreground="#1550B7" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Center"  Margin="20,0,0,0"/>
                                    </Border>
                                </Border>

                                <Border Grid.Row="1" Background="Transparent" BorderBrush="#5B93EA" BorderThickness="2" CornerRadius="3" Margin="10,10" MouseLeftButtonDown="SizeLeftImage_MouseLeftButtonDown">
                                    <Image Source="{Binding SizeLeftImage}" Stretch="Uniform"/>
                                </Border>

                            </Grid>
                        </Border>
                        <Border Grid.Column="1" Background="White" BorderBrush="White" BorderThickness="2" Margin="5,0,0,0">
                            <Grid Margin="10,0,10,0">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="2*"/>
                                    <RowDefinition Height="9*"/>
                                </Grid.RowDefinitions>

                                <Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                                    <Border Grid.Row="0" BorderBrush="#1352B2" BorderThickness="10,0,0,0">
                                        <TextBlock Text="产品尺寸（mm）" Foreground="#1550B7" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Center"  Margin="20,0,0,0"/>
                                    </Border>
                                </Border>

                                <Border Grid.Row="1" Background="Transparent" BorderBrush="#5B93EA" BorderThickness="2" CornerRadius="3" Margin="10,10" MouseLeftButtonDown="SizeRightImage_MouseLeftButtonDown">
                                    <Image Source="{Binding SizeRightImage}" Stretch="Uniform"/>
                                </Border>

                            </Grid>
                        </Border>
                    </Grid>
                </Border>
            </Grid>
        </Border>
    </Grid>
</UserControl>
