Grid не растягивается на всю область

Проблема в том, что на превьюшке в студии всё норм введите сюда описание изображения

но когда запускаешь Debugger то появляется свободное место сверху введите сюда описание изображения

Основной Grid я делю на Column и Row и в первом Row создаю Grid с Background, но почему то не работает

<Window x:Class="StudyApp.View.LoginView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
        Title="LoginView" Height="500" Width="800"
        WindowStartupLocation="CenterScreen" 
        WindowStyle="None"
        AllowsTransparency="False">
    <Window.Resources>
        <Style x:Key="FooterBtn" TargetType="Button">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderBrush" Value="Transparent"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="Cursor" Value="Hand"/>
        </Style>
    </Window.Resources>

    <Grid ShowGridLines="False">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="2*"/>
            <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="18"/>
            <RowDefinition/>
        </Grid.RowDefinitions>

        <Grid x:Name="Header" ColumnSpan="2" Background="Gray">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                <Button x:Name="HideBtn" 
                        Style="{StaticResource FooterBtn}"
                        Content="{materialDesign:PackIcon WindowMinimize}"
                        Click="HideBtn_OnClick"/>
                <Button x:Name="CollapseBtn" 
                        Style="{StaticResource FooterBtn}"
                        Content="{materialDesign:PackIcon WindowMaximize}">                                       
                </Button>
                <Button x:Name="CloseBtn" 
                        Style="{StaticResource FooterBtn}"
                        Content="{materialDesign:PackIcon Close}"
                        Click="CloseBtn_OnClick"/>
            </StackPanel>
        </Grid>  
    </Grid>
</Window>

Ответы (0 шт):