MainWindow.xaml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <Window x:Class="exam.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:exam"
  7. mc:Ignorable="d"
  8. Title="MainWindow" Height="450" Width="800">
  9. <Grid>
  10. <Grid.ColumnDefinitions>
  11. <ColumnDefinition Width="200"/>
  12. <ColumnDefinition/>
  13. </Grid.ColumnDefinitions>
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="auto"/>
  16. <RowDefinition/>
  17. <RowDefinition Height="50"/>
  18. </Grid.RowDefinitions>
  19. <Image
  20. Source="assets/logo.jpg"
  21. Grid.Row ="0"
  22. Grid.RowSpan="2"
  23. Stretch="Fill"/>
  24. <WrapPanel
  25. Grid.Column="1"
  26. MinHeight="50"
  27. Orientation="Horizontal">
  28. <Label
  29. Content="Категория:"/>
  30. <ComboBox
  31. Name="CategoryFilterComboBox"
  32. SelectionChanged="CategoryFilterComboBox_SelectionChanged"
  33. MinWidth="100"
  34. SelectedIndex="0"
  35. ItemsSource="{Binding ClothesCategoriesList}">
  36. <ComboBox.ItemTemplate>
  37. <DataTemplate>
  38. <Label
  39. Content="{Binding Title}"/>
  40. </DataTemplate>
  41. </ComboBox.ItemTemplate>
  42. </ComboBox>
  43. </WrapPanel>
  44. <DataGrid
  45. Grid.Column="1"
  46. Grid.Row="1"
  47. CanUserAddRows="False"
  48. AutoGenerateColumns="False"
  49. ItemsSource="{Binding ClothesList}">
  50. <DataGrid.Columns>
  51. <DataGridTextColumn
  52. Header="Бренд"
  53. Binding="{Binding Brand}"/>
  54. <DataGridTextColumn
  55. Header="Название"
  56. Binding="{Binding Title}"/>
  57. <DataGridTextColumn
  58. Header="Категория"
  59. Binding="{Binding Category}"/>
  60. <DataGridTextColumn
  61. Header="Цена"
  62. Binding="{Binding Price}"/>
  63. <DataGridTextColumn
  64. Header="Оценка"
  65. Binding="{Binding Rating}"/>
  66. <DataGridTextColumn
  67. Header="Наличие"
  68. Binding="{Binding Existence}"/>
  69. </DataGrid.Columns>
  70. </DataGrid>
  71. <Button x:Name="ExitButton"
  72. Content="Выйти"
  73. Grid.Row="2"
  74. Click="ExitButton_Click"/>
  75. </Grid>
  76. </Window>