demo/Demo/MainWindow.axaml
2024-09-05 16:22:57 +03:00

46 lines
1.9 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="Demo.MainWindow"
x:CompileBindings="False"
Title="Demo">
<DockPanel Background="{StaticResource AccentColor}">
<Border DockPanel.Dock="Top" Background="White">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="25">
<TextBox Width="250" Name="SearchTextBox" TextChanging="SearchTextBox_TextChanging"/>
<ComboBox Name="DiscountComboBox"/>
<ComboBox Name="SortComboBox" SelectionChanged="SortComboBox_SelectionChanged"/>
<Button Name="ChangeModeButton" Click="ChangeModeButton_ClickAsync">Смена режима</Button>
</StackPanel>
</Border>
<Border DockPanel.Dock="Bottom" Background="Green">
<TextBlock Name="CountValues"/>
</Border>
<Border Width="250" Name="AdminPanel" DockPanel.Dock="Right" Background="Aqua" IsVisible="False">
<Image Name="MyImage" Width="100" Height="100"/>
</Border>
<Border>
<ListBox Name="ServiceList">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image />
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding ServiceName}" />
<TextBlock Text="{Binding ServicePriceMinutes}"/>
<TextBlock Text="{Binding ServiceDiscount}"/>
<StackPanel Name="AdminServicePanel" Orientation="Horizontal" IsVisible="{Binding AdminMode}">
<Button Name="EditButton" />
<Button Name="RemoveButton" />
</StackPanel>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
</DockPanel>
</Window>