MainWindow.xaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <Window x:Class="mysql_connector2.MainWindow"
  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_connector2"
  7. mc:Ignorable="d"
  8. Title="MainWindow" Height="450" Width="800">
  9. <Grid ShowGridLines="True">
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="auto"/>
  12. <RowDefinition />
  13. <RowDefinition Height="auto"/>
  14. </Grid.RowDefinitions>
  15. <Grid.ColumnDefinitions>
  16. <ColumnDefinition Width="200"/>
  17. <ColumnDefinition/>
  18. </Grid.ColumnDefinitions>
  19. <ListBox
  20. Grid.Row="1"
  21. Grid.Column="1"
  22. Background="White"
  23. ItemsSource="{Binding productList}"
  24. ScrollViewer.HorizontalScrollBarVisibility="Disabled" Margin="3,3,0,0" RenderTransformOrigin="0.5,0.5">
  25. <ListBox.ItemContainerStyle>
  26. <Style
  27. TargetType="ListBoxItem">
  28. <Setter
  29. Property="HorizontalContentAlignment"
  30. Value="Stretch" />
  31. </Style>
  32. </ListBox.ItemContainerStyle>
  33. <ListBox.ItemTemplate>
  34. <DataTemplate>
  35. <Border
  36. BorderThickness="1"
  37. BorderBrush="Black"
  38. CornerRadius="5">
  39. <Grid
  40. Margin="10"
  41. HorizontalAlignment="Stretch">
  42. <Grid.ColumnDefinitions>
  43. <ColumnDefinition Width="64"/>
  44. <ColumnDefinition Width="*"/>
  45. <ColumnDefinition Width="auto"/>
  46. </Grid.ColumnDefinitions>
  47. <Image
  48. Width="64"
  49. Height="64"
  50. Source="{Binding ImageBitmap}" HorizontalAlignment="Center"/>
  51. <StackPanel
  52. Grid.Column="1"
  53. Margin="5"
  54. Orientation="Vertical">
  55. <TextBlock
  56. Text="{Binding Title}"/>
  57. <TextBlock
  58. Text="{Binding ArticleNumber}"/>
  59. </StackPanel>
  60. <TextBlock
  61. Grid.Column="2"
  62. Text="{Binding ProductTypeID}"/>
  63. </Grid>
  64. </Border>
  65. </DataTemplate>
  66. </ListBox.ItemTemplate>
  67. </ListBox>
  68. <Image
  69. Source="/logo/Logo.jpg"
  70. Grid.RowSpan="2"/>
  71. <StackPanel
  72. Orientation="Vertical"
  73. Grid.RowSpan="3"
  74. VerticalAlignment="Bottom">
  75. <Button
  76. x:Name="ExitButton"
  77. Content="Выход"
  78. Click="ExitButton_Click"
  79. Height="54"/>
  80. </StackPanel>
  81. <WrapPanel
  82. Orientation="Horizontal"
  83. Grid.Column="1"
  84. MinHeight="50">
  85. </WrapPanel>
  86. </Grid>
  87. </Window>