1
0
Files
cpo-lab/Lab2/src/Form/CreateScythe.xaml
2024-05-14 22:00:38 +03:00

43 lines
2.4 KiB
XML

<Window x:Class="Lab2.CreateScythe"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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:local="clr-namespace:Lab2"
mc:Ignorable="d"
Title="CreateScythe" Height="400" Width="200" Closing="Window_Closing">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Label Content="Name:" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" />
<TextBox x:Name="_nameTextBox" Grid.Row="0" Grid.Column="1" Margin="5,5,5,5" Text="{Binding Name, UpdateSourceTrigger=Explicit}" />
<Label Content="Material:" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" />
<ComboBox x:Name="_materialComboBox" Grid.Row="1" Grid.Column="1" Margin="5,5,5,5" Text="{Binding Material, UpdateSourceTrigger=Explicit}" />
<Label Content="Weight:" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" />
<TextBox x:Name="_weightTextBox" Grid.Row="2" Grid.Column="1" Margin="5,5,5,5" Text="{Binding Weight, UpdateSourceTrigger=Explicit}" />
<Label Content="Handle length:" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" />
<TextBox x:Name="_handleLengthTextBox" Grid.Row="3" Grid.Column="1" Margin="5,5,5,5" Text="{Binding HandleLength, UpdateSourceTrigger=Explicit}" />
<Label Content="Blade type:" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" />
<ComboBox x:Name="_bladeTypeComboBox" Grid.Row="4" Grid.Column="1" Margin="5,5,5,5" Text="{Binding BladeType, UpdateSourceTrigger=Explicit}" />
<Button Name="_saveButton" Click="SaveButton_Click" Content="Save" Grid.Row="5" Grid.Column="0" Margin="5,5,5,5" />
<Button Content="Cancel" IsCancel="True" Grid.Row="5" Grid.Column="1" Margin="5,5,5,5" />
</Grid>
</Window>