123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <Window x:Class="WpfApp1.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:WpfApp1"
- mc:Ignorable="d"
- Title="MainWindow" Height="450" Width="800">
- <Grid ShowGridLines="True">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition />
- <RowDefinition Height="auto"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="200"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <!-- типа логотип компании -->
- <Image
- Source="/img/1.jpg"
- Grid.RowSpan="2" HorizontalAlignment="Right"/>
- <DataGrid
- Grid.Row="1"
- Grid.Column="1"
- CanUserAddRows="False"
- AutoGenerateColumns="False"
- ItemsSource="{Binding ClientList}">
- <DataGrid.Columns>
- <DataGridTextColumn
- Header="Имя"
- Binding="{Binding Name}"/>
- <DataGridTextColumn
- Header="Возраст"
- Binding="{Binding Age}"/>
- <DataGridTextColumn
- Header="Цена"
- Binding="{Binding Price}"/>
- <DataGridTextColumn
- Header="Место"
- Binding="{Binding Place}"/>
- <DataGridTextColumn
- Header="Категория"
- Binding="{Binding Category}"/>
- <DataGridTextColumn
- Header="Дата полета"
- Binding="{Binding DateFlight,StringFormat='dd.MM.yyyy'}"/>
- <DataGridTextColumn
- Header="IsActive"
- Binding="{Binding IsActive}"/>
- </DataGrid.Columns>
- </DataGrid>
- <StackPanel
- Orientation="Vertical"
- Grid.RowSpan="3"
- VerticalAlignment="Bottom">
- <Button
- x:Name="ExitButton"
- Content="Выход"
- Click="ExitButton_Click"
- Height="50"/>
- </StackPanel>
- <WrapPanel
- Orientation="Horizontal"
- Grid.Column="1"
- MinHeight="50">
- <Label
- Content="Искать:"
- VerticalAlignment="Center"/>
- <TextBox
- Width="200"
- VerticalAlignment="Center"
- x:Name="SearchFilterTextBox"
- KeyUp="SearchFilter_KeyUp"/>
- <ComboBox
- Name="CategoryFilterComboBox"
- SelectionChanged="ClientCategoryFilterComboBox_selectionChanged"
- VerticalAlignment="Center"
- MinWidth="100"
- SelectedIndex="0"
- ItemsSource="{Binding ClientCategoryList}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <Label
- Content="{Binding title}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <Label
- Content="Цена:"
- VerticalAlignment="Center"/>
- <ComboBox
- Name="PriceFilterComboBox"
- SelectionChanged="ClientPriceFilterComboBox_selectionChanged"
- VerticalAlignment="Center"
- MinWidth="100"
- SelectedIndex="0"
- ItemsSource="{Binding ClientPriceList}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <Label
- Content="{Binding title}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <Label
- Content="Возраст:"
- VerticalAlignment="Center"/>
- <RadioButton
- GroupName="Age"
- Tag="1"
- Content="Сначала взрослые"
- IsChecked="True"
- Checked="RadioButton_Checked"
- VerticalAlignment="Center"/>
- <RadioButton
- GroupName="Age"
- Tag="2"
- Content="Сначала дети"
- Checked="RadioButton_Checked"
- VerticalAlignment="Center"/>
- <!-- минимальную высоту я тут поставил, чтобы верхнюю строку сетки было видно. В реальном приложении она не нужна -->
- </WrapPanel>
- </Grid>
- </Window>
|