auto_service/AutoService/Views/WorksWindow.axaml

23 lines
1.2 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"
xmlns:models="using:AutoService.Models"
xmlns:vm="clr-namespace:AutoService.ViewModels"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="AutoService.WorksWindow"
Title="AutoService"
x:DataType="vm:WorksWindowVM">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="30">
<DataGrid ItemsSource="{Binding Works}" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Название" Binding="{Binding Work.Title}"/>
<DataGridTextColumn Header="Цена" Binding="{Binding Work.Price}"/>
<DataGridCheckBoxColumn Header="Выполнено" Binding="{Binding IsChecked}"/>
</DataGrid.Columns>
</DataGrid>
<Button Content="Рассчитать стоимость" Command="{Binding CalculateCountCommand}"/>
</StackPanel>
</Window>