ProductDetailsWindow.xaml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <Window x:Class="wpf_app.Model.Windows.ProductDetailsWindow"
  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:wpf_app.Model.Windows"
  7. mc:Ignorable="d"
  8. Title="{Binding WindowTitle}" Height="400" Width="700">
  9. <Window.Resources>
  10. <BitmapImage
  11. x:Key='defaultImage'
  12. UriSource="./img/defaultPicture.jpg"/>
  13. </Window.Resources>
  14. <Grid>
  15. <Grid.ColumnDefinitions>
  16. <ColumnDefinition Width="250"/>
  17. <ColumnDefinition/>
  18. </Grid.ColumnDefinitions>
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="50"/>
  21. <RowDefinition/>
  22. <RowDefinition Height="50"/>
  23. </Grid.RowDefinitions>
  24. <Border
  25. Grid.Row="0"
  26. Grid.RowSpan="3"
  27. BorderBrush="Black"
  28. BorderThickness="2"
  29. CornerRadius="5"
  30. Margin="5 5 5 5">
  31. <Image
  32. Source="{Binding ImageBitmap, TargetNullValue={StaticResource defaultImage}}"
  33. Stretch="Fill"/>
  34. </Border>
  35. <TextBlock
  36. Grid.Column="1"
  37. Margin="20 0 0 0"
  38. FontSize="25">
  39. <Run Text="{Binding Category}"/>
  40. <Run Text="{Binding Company}"/>
  41. <Run Text="{Binding Title}"/>
  42. </TextBlock>
  43. <StackPanel
  44. Grid.Column="1"
  45. Grid.Row="1"
  46. TextElement.FontSize="15"
  47. Margin="20 0 0 0">
  48. <TextBlock Text="Категория товара: ">
  49. <Run Text="{Binding Category}"/>
  50. </TextBlock>
  51. <TextBlock Text="Компания: ">
  52. <Run Text="{Binding Company}"/>
  53. </TextBlock>
  54. <TextBlock Text="Название товара: ">
  55. <Run Text="{Binding Title}"/>
  56. </TextBlock>
  57. <TextBlock Text="Оценка покупателей: ">
  58. <Run Text="{Binding Rating}"/>
  59. </TextBlock>
  60. <TextBlock Text="Дата поступления: ">
  61. <Run Text="{Binding ArrivalDate}"/>
  62. </TextBlock>
  63. <TextBlock Text="{Binding ExistenceStringS}"/>
  64. <TextBlock Text="Цена: ">
  65. <Run Text="{Binding Price}"/>
  66. </TextBlock>
  67. </StackPanel>
  68. <Button
  69. x:Name="ExitButton"
  70. Grid.Column="1"
  71. Grid.Row="2"
  72. Width="150"
  73. VerticalAlignment="Center"
  74. HorizontalAlignment="Right"
  75. Margin="10"
  76. IsCancel="True"
  77. Content="Закрыть"
  78. Click="ExitButton_Click"/>
  79. </Grid>
  80. </Window>