repo2403/PartnerWindow.axaml

46 lines
1.8 KiB
Plaintext
Raw Permalink Normal View History

2025-03-24 11:59:01 +00:00
<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="demka2025_sedelnikov.PartnerWindow"
Title="PartnerWindow">
<Grid RowDefinitions="*, 10*, *" ColumnDefinitions="*, 10*, *">
<ListBox Grid.Row="1" Grid.Column="1" x:Name="PartnerLB">
<ListBox.ItemTemplate>
<DataTemplate>
<ListBoxItem Background="#F4E8D3" Tag="{Binding Id}" DoubleTapped="ListBoxItem_DoubleTapped">
<Grid RowDefinitions="*, *, *, *" ColumnDefinitions="*, Auto">
<Grid ColumnDefinitions="*, *">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding PartnerTypeString, StringFormat='{}Тип: {0} | '}"/>
<TextBlock Text="{Binding PartnerName, StringFormat='{}Наим. партнёра: {0}'}"/>
</StackPanel>
</Grid>
<StackPanel Grid.Column="1">
<TextBlock Text="{Binding PartnerDiscount, StringFormat='{}Скидка: {0}%'}"/>
</StackPanel>
<StackPanel Grid.Row="1">
<TextBlock Text="{Binding DirectorName, StringFormat='{}Директор: {0}'}"/>
</StackPanel>
<StackPanel Grid.Row="2">
<TextBlock Text="{Binding Phone, StringFormat='{}Номер телефона: {0}'}"/>
</StackPanel>
<StackPanel Grid.Row="3">
<TextBlock Text="{Binding Rating, StringFormat='{}Рейтинг: {0}'}"/>
</StackPanel>
</Grid>
</ListBoxItem>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button Background="#67BA80" Grid.Row="2" Grid.Column="1" Content="Добавить" Click="Button_Click"/>
</Grid>
</Window>