demo2025_products_tiron_baby/ProductsWindow.axaml
Your Name 4ba7d31e91 demo
2025-03-25 15:37:37 +03:00

40 lines
2.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="tiron_demo.ProductsWindow"
WindowStartupLocation="CenterScreen"
Icon="avares://tiron_demo/Resources/icon.ico"
Title="Продукты">
<Grid Margin="10" RowDefinitions="*, auto">
<ListBox Grid.Row="0" Name="Products" Margin="10" DoubleTapped="ListBox_DoubleTapped">
<ListBox.Styles>
<Style Selector="ListBoxItem:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="#F4E8D3"/>
</Style>
<Style Selector="ListBoxItem:selected /template/ ContentPresenter">
<Setter Property="Background" Value="#67BA80"/>
</Style>
</ListBox.Styles>
<ListBox.ItemTemplate>
<DataTemplate>
<Border Padding="10" BorderBrush="Black" BorderThickness="1" Background="{Binding ProductBackground}">
<StackPanel>
<TextBlock FontFamily="fonts:SystemFonts#Segoe UI" Text="{Binding Articul}" HorizontalAlignment="Right" />
<TextBlock FontFamily="fonts:SystemFonts#Segoe UI" Text="{Binding Name}" />
<TextBlock FontFamily="fonts:SystemFonts#Segoe UI" Text="{Binding TypeNavigation.Name}" />
</StackPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button FontFamily="fonts:SystemFonts#Segoe UI" Margin="10" Grid.Row="1" HorizontalAlignment="Right" Content="Добавить" Click="Button_Click_Add" />
<Button FontFamily="fonts:SystemFonts#Segoe UI" Margin="10" Grid.Row="1" HorizontalAlignment="Center" Content="История" Click="Button_Click_History" />
<Button FontFamily="fonts:SystemFonts#Segoe UI" Margin="10" Grid.Row="1" HorizontalAlignment="Left" Content="Назад" Click="Button_Click_Back" />
</Grid>
</Window>