<Window x:Class="wpf_connection3.Windows.EditProductWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:wpf_connection3.Windows"
        mc:Ignorable="d"
        Title="EditProductWindow" Height="600" Width="800"
         Name="root">
   
    <Grid>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="auto"/>
        </Grid.ColumnDefinitions>


        <Image
Name="CurrentProductImage"
Width="200" 
Height="200"
Source="{Binding currentProduct.ImageBitmap}" />
        <StackPanel
      Grid.Column="1"
            Margin="5">

            <Label Content="Артикул"/>
            <TextBox
                Name="ArticleNumberTextBox"
                
                Text="{Binding currentProduct.ArticleNumber}"/>

            <Label Content="Наименование продукта"/>
            <TextBox
                Name="TitleTextBox"
                Text="{Binding currentProduct.Title}"/>

            <Label Content="Тип продукта"/>
            <ComboBox
                Name="ProductTypeComboBox"
                ItemsSource="{Binding productTypeList}"
                SelectedIndex="{Binding selectedProductIndex}"/>

            <Label Content="Количество человек для производства"/>
            <TextBox 
                Name="ProductionPersonCountTextBox"
                Text="{Binding currentProduct.ProductionPersonCount}"/>

            <Label Content="Номер производственного цеха"/>
            <TextBox 
                Name="ProductionWorkshopNumberTextBox"
                Text="{Binding currentProduct.ProductionWorkshopNumber}"/>

            <Label Content="Минимальная стоимость для агента"/>
            <TextBox
                Name="MinCostForAgentTextBox"
                Text="{Binding currentProduct.MinCostForAgent}"/>

            <Label Content="Описание продукта"/>
            <TextBox
                Name="DescriptionTextBox"
                AcceptsReturn="True"
                Height="200"
                Text="{Binding currentProduct.Descrpition}"/>

            <Button
                Name="ChangeImageButton"
                Content="Изменить фото"
                Margin="5"
                Click="ChangeImageButton_Click"/>

            <Button
                Name="SaveButton"
                Content="Сохранить"
                Margin="5"
                Click="SaveButton_Click"/>

            <Button
                Name="deleteButton"
                Content="Удалить продукт"
                Margin="5"
                Click="deleteButton_Click"/>
            
        </StackPanel>
       
    </Grid>
</Window>
