DemoService/ServiceWindow.axaml
2024-09-09 09:46:08 +03:00

69 lines
2.2 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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="600"
x:Class="DemoService.ServiceWindow"
x:CompileBindings="False"
Title="Сервис «Подай на 16»">
<StackPanel Orientation="Vertical">
<Grid RowDefinitions="Auto"
ColumnDefinitions="* Auto Auto">
<TextBox Grid.Column="0"
Watermark="Поиск"/>
<ComboBox Name="SortComboBox"
Grid.Column="1"
SelectionChanged="SortComboBox_SelectionChanged">
<ComboBoxItem>Не сортировать</ComboBoxItem>
<ComboBoxItem>По возрастанию</ComboBoxItem>
<ComboBoxItem>По убыванию</ComboBoxItem>
</ComboBox>
<ComboBox Grid.Column="2"
SelectedIndex="0">
<ComboBoxItem>Фильтрация</ComboBoxItem>
</ComboBox>
</Grid>
<Button Name="AddButton" Click="AddButton_Click">
Добавить
</Button>
<ScrollViewer>
<ListBox Name="ServicesListBox">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image/>
<StackPanel Orientation="Vertical">
<TextBlock Name="ServiceName"
Text="{Binding Title}"/>
<TextBlock>
<Run Name="PreviousCost"/>
<Run Name="ActualCost"
Text="{Binding Cost}"/>
<Run Text="рублей за"/>
<Run Name="Time"
Text="{Binding DurationInSeconds}"/>
<Run Text="минут"/>
</TextBlock>
<TextBlock>
<Run Text="* скидка"/>
<Run Name="Discount"
Text="{Binding Discount}"/>
</TextBlock>
<StackPanel Name="AdminServicePanel"
Orientation="Horizontal">
<Button Name="EditButton">
Изменить
</Button>
<Button Name="DeleteButton">
Удалить
</Button>
</StackPanel>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
</StackPanel>
</Window>