EditWindow.xaml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <Window x:Class="mysql.Windows.EditWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:mysql.Windows"
  7. mc:Ignorable="d"
  8. Title="{Binding WindowName}"
  9. Height="450"
  10. Width="800">
  11. <Window.Resources>
  12. <BitmapImage
  13. x:Key='defaultImage'
  14. UriSource='./Images/picture.png' />
  15. </Window.Resources>
  16. <Grid>
  17. <Grid.ColumnDefinitions>
  18. <ColumnDefinition Width="auto"/>
  19. <ColumnDefinition Width="*"/>
  20. <ColumnDefinition Width="auto"/>
  21. </Grid.ColumnDefinitions>
  22. <Image
  23. Width="200"
  24. Height="200"
  25. Source="{Binding CurrentProduct.ImagePreview,TargetNullValue={StaticResource defaultImage}}" />
  26. <StackPanel
  27. Grid.Column="1"
  28. Margin="5">
  29. <Label Content="Артикул"/>
  30. <TextBox Text="{Binding CurrentProduct.ArticleNumber}"/>
  31. <Label Content="Наименование продукта"/>
  32. <TextBox Text="{Binding CurrentProduct.Title}"/>
  33. <Label Content="Тип продукта"/>
  34. <ComboBox
  35. ItemsSource="{Binding ProductTypes}"
  36. SelectedItem="{Binding CurrentProduct.CurrentProductType}"/>
  37. <!-- тип продукта (выпадающий список), изображение, количество человек для производства, номер производственного цеха, минимальная стоимость для агента и подробное описание -->
  38. <Label Content="Описание продукта"/>
  39. <TextBox
  40. AcceptsReturn="True"
  41. Height="2cm"
  42. Text="{Binding CurrentProduct.Description}"/>
  43. <Button
  44. x:Name="ChangeImage"
  45. Click="ChangeImage_Click"
  46. Content="Выбрать картинку"/>
  47. <Button
  48. Content="Сохранить"
  49. Click="Button_Click"/>
  50. </StackPanel>
  51. </Grid>
  52. </Window>