<Window x:Class="WpfApp1.LoginWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Авторизация" Height="380" Width="380"
        WindowStartupLocation="CenterScreen" 
        ResizeMode="NoResize">

    <Grid Margin="30">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!-- Заголовок -->
        <TextBlock Text="Вход в систему" FontSize="20" FontWeight="Bold" 
                 HorizontalAlignment="Center" Margin="0,0,0,25"/>

        <!-- Логин -->
        <TextBlock Text="Логин:" Grid.Row="1" Margin="0,0,0,5"/>
        <TextBox x:Name="txtLogin" Grid.Row="2" Height="30" Margin="0,0,0,15"/>

        <!-- Пароль -->
        <TextBlock Text="Пароль:" Grid.Row="3" Margin="0,0,0,5"/>
        <PasswordBox x:Name="txtPassword" Grid.Row="4" Height="30" Margin="0,0,0,20"/>

        <!-- Ошибка -->
        <TextBlock x:Name="lblError" Grid.Row="5" Foreground="Red" 
                 TextAlignment="Center" Margin="0,0,0,15" TextWrapping="Wrap"/>

        <!-- Кнопка -->
        <Button Content="Войти" Grid.Row="6" Width="120" Height="35" 
               Click="BtnLogin_Click" IsDefault="True"
               HorizontalAlignment="Center" VerticalAlignment="Top"/>
    </Grid>
</Window>