Загрузка данных
<Window x:Class="WpfApp_Lab.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Работники" Height="600" Width="700"
WindowStartupLocation="CenterScreen">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Заголовок -->
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" Text="Ввод данных о работнике"
FontSize="20" FontWeight="Bold" Margin="0,0,0,10" HorizontalAlignment="Center"/>
<!-- Фамилия -->
<TextBlock Grid.Row="1" Grid.Column="0" Text="Фамилия:" VerticalAlignment="Center"/>
<TextBox Grid.Row="1" Grid.Column="1" Name="txtLastName" Margin="0,0,0,5"/>
<!-- Зарплата -->
<TextBlock Grid.Row="2" Grid.Column="0" Text="Зарплата:" VerticalAlignment="Center"/>
<TextBox Grid.Row="2" Grid.Column="1" Name="txtSalary" Margin="0,0,0,5"/>
<!-- Должность (ComboBox) -->
<TextBlock Grid.Row="3" Grid.Column="0" Text="Должность:" VerticalAlignment="Center"/>
<ComboBox Grid.Row="3" Grid.Column="1" Name="cmbPosition" IsEditable="True" Margin="0,0,0,5">
<ComboBoxItem>Разработчик</ComboBoxItem>
<ComboBoxItem>Тестировщик</ComboBoxItem>
<ComboBoxItem>Менеджер</ComboBoxItem>
<ComboBoxItem>Директор</ComboBoxItem>
</ComboBox>
<!-- Город (ComboBox) -->
<TextBlock Grid.Row="4" Grid.Column="0" Text="Город:" VerticalAlignment="Center"/>
<ComboBox Grid.Row="4" Grid.Column="1" Name="cmbCity" IsEditable="True" Margin="0,0,0,5">
<ComboBoxItem>Москва</ComboBoxItem>
<ComboBoxItem>Санкт-Петербург</ComboBoxItem>
<ComboBoxItem>Казань</ComboBoxItem>
<ComboBoxItem>Новосибирск</ComboBoxItem>
</ComboBox>
<!-- Улица (ComboBox) -->
<TextBlock Grid.Row="5" Grid.Column="0" Text="Улица:" VerticalAlignment="Center"/>
<ComboBox Grid.Row="5" Grid.Column="1" Name="cmbStreet" IsEditable="True" Margin="0,0,0,5">
<ComboBoxItem>Ленина</ComboBoxItem>
<ComboBoxItem>Пушкина</ComboBoxItem>
<ComboBoxItem>Гагарина</ComboBoxItem>
<ComboBoxItem>Советская</ComboBoxItem>
</ComboBox>
<!-- Дом -->
<TextBlock Grid.Row="6" Grid.Column="0" Text="Дом:" VerticalAlignment="Center"/>
<TextBox Grid.Row="6" Grid.Column="1" Name="txtHouse" Margin="0,0,0,5"/>
<!-- Кнопки -->
<StackPanel Grid.Row="7" Grid.ColumnSpan="2" Orientation="Horizontal" Margin="0,10,0,10">
<Button Name="btnAdd" Content="Добавить" Width="100" Height="30" Click="BtnAdd_Click" Margin="0,0,10,0"/>
<Button Name="btnSave" Content="Сохранить в файл" Width="120" Height="30" Click="BtnSave_Click" Margin="0,0,10,0"/>
<Button Name="btnLoad" Content="Загрузить из файла" Width="140" Height="30" Click="BtnLoad_Click"/>
</StackPanel>
<!-- ListBox для списка работников -->
<ListBox Grid.Row="8" Grid.ColumnSpan="2" Name="listBoxEmployees" Margin="0,5,0,0"/>
</Grid>
</Window>