123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- <Window x:Class="wpf_template.MainWindow"
- 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_template"
- mc:Ignorable="d"
- Title="MainWindow" Height="450" Width="950">
-
- <Grid ShowGridLines="True">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition />
- <RowDefinition Height="auto"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="200"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Image
- Source="assets/nagievlogo2.jpg"
- Grid.Row="1"
- Grid.RowSpan="2"/>
- <StackPanel
- Orientation="Vertical"
- Grid.RowSpan="3"
- Grid.Row="2"
- VerticalAlignment="Bottom">
- <Button
- x:Name="ExitButton"
- Content="Выход"
- Click="ExitButton_Click"
- Height="50"/>
- </StackPanel>
- <DataGrid
- Grid.Row="1"
- Grid.Column="1"
- CanUserAddRows="False"
- AutoGenerateColumns="False"
- ItemsSource="{Binding ProductList}">
- <DataGrid.Columns>
- <DataGridTextColumn
- Header="Категория"
- Binding="{Binding Category}"/>
- <DataGridTextColumn
- Header="Компания"
- Binding="{Binding Company}"/>
- <DataGridTextColumn
- Header="Название"
- Binding="{Binding Title}"/>
- <DataGridTextColumn
- Header="Цена"
- Binding="{Binding Price}"/>
- <DataGridTextColumn
- Header="Наличие"
- Binding="{Binding ExistenceString}"/>
- <DataGridTextColumn
- Header="Дата поступления"
- Binding="{Binding ArrivalDate,StringFormat='dd.MM.yyyy'}"/>
- <DataGridTextColumn
- Header="Оценка"
- Binding="{Binding Rating}"/>
- </DataGrid.Columns>
- </DataGrid>
- <WrapPanel
- Orientation="Horizontal"
- Grid.Column="1"
- MinHeight="50"
- Margin="0 5 0 0">
- <Label
- Content="Категория:"
- VerticalAlignment="Center"/>
- <ComboBox
- Name="CategoryFilterComboBox"
- SelectionChanged="CategoryFilterComboBox_SelectionChanged"
- VerticalAlignment="Center"
- MinWidth="100"
- SelectedIndex="0"
- ItemsSource="{Binding CategoryList}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <Label
- Content="{Binding title}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <Label
- Content="Цена"/>
- <ComboBox
- Name ="PriceFilterComboBox"
- SelectionChanged="PriceFilterComboBox_SelectionChanged"
- VerticalAlignment="Center"
- MinWidth="100"
- SelectedIndex="0"
- ItemsSource="{Binding ProductPrices}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <Label
- Content="{Binding title}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <Label
- Content="Компания"/>
- <ComboBox
- Name ="CompanyFilterComboBox"
- SelectionChanged="CompanyFilterComboBox_SelectionChanged"
- VerticalAlignment="Center"
- MinWidth="100"
- SelectedIndex="0"
- ItemsSource="{Binding ProductCompanies}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <Label
- Content="{Binding title}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <Label
- Content="Поиск"
- VerticalAlignment="Center"/>
- <TextBox
- Width="180"
- VerticalAlignment="Center"
- x:Name="SearchFilterTextBox"
- KeyUp="SearchFilterTextBox_KeyUp"/>
- <Label
- Content="Цена:"
- VerticalAlignment="Center"/>
- <RadioButton
- GroupName="Price"
- Tag="1"
- Content="по возрастанию"
- IsChecked="True"
- Checked="RadioButton_Checked"
- VerticalAlignment="Center"/>
- <RadioButton
- GroupName="Price"
- Tag="2"
- Content="по убыванию"
- Checked="RadioButton_Checked"
- VerticalAlignment="Center"/>
- </WrapPanel>
- </Grid>
- </Window>
|