demka/demofinish/MainWindow.axaml
2025-03-31 21:03:22 +03:00

74 lines
4.0 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
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"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="demofinish.MainWindow"
x:CompileBindings="False"
Title="demofinish">
<DockPanel>
<StackPanel DockPanel.Dock="Top" Margin="10" HorizontalAlignment="Center" Orientation="Horizontal">
<AutoCompleteBox x:Name="SearchBox" Watermark="Поиск" FilterMode="StartsWith" HorizontalAlignment="Center" Margin="5" Width="200"/>
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Text="Тип агента"/>
<ComboBox x:Name="TypeAgentCombobox" Margin="5" Width="200">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Text="Сортировка приоритета"/>
<ComboBox MaxDropDownHeight="100" Width="200" Margin="5" x:Name="PriorityCombobox">
<ComboBoxItem>по убыванию</ComboBoxItem>
<ComboBoxItem>по возрастанию</ComboBoxItem>
</ComboBox>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Text="Сортировка наименования"/>
<ComboBox MaxDropDownHeight="100" Width="200" Margin="5" x:Name="NameComboBox">
<ComboBoxItem>по убыванию</ComboBoxItem>
<ComboBoxItem>по возрастанию</ComboBoxItem>
</ComboBox>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Text="Сортировка по скидке"/>
<ComboBox MaxDropDownHeight="100" Width="200" Margin="5" x:Name="SaleCombobox">
<ComboBoxItem>по убыванию</ComboBoxItem>
<ComboBoxItem>по возрастанию</ComboBoxItem>
</ComboBox>
</StackPanel>
</StackPanel>
<ListBox x:Name="AgentListBox">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="3"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderThickness="1" Margin="5">
<StackPanel HorizontalAlignment="Center" Spacing="5">
<Image HorizontalAlignment="Center" Width="100" Height="100" Source="{Binding LogoImage}" Margin="5"/>
<TextBlock Text="{Binding Title, StringFormat='Наименование: {0}'}"/>
<TextBlock Text="{Binding Phone, StringFormat='Телефон: {0}'}"/>
<TextBlock Text="{Binding Agenttypeid, StringFormat='Тип агента: {0}'}"/>
</StackPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Center" Margin="10">
<Button Content="Назад" Margin="5" Click="PrevPage_Click"/>
<TextBlock Text="{Binding currentPage}" VerticalAlignment="Center" Margin="5"/>
<TextBlock Text="{Binding pageCount}" VerticalAlignment="Center" Margin="5"/>
<Button Content="Вперед" Margin="5" Click="NextPage_Click"/>
</StackPanel>
</DockPanel>
</Window>