.net WPF WindowChrome默认标题高度被截断

.net WPF WindowChrome默认标题高度被截断,.net,wpf,xaml,window-chrome,.net,Wpf,Xaml,Window Chrome,我试图在Windows10上用WPF绘制标题栏。我的WindowChrome设置如下: <Window x:Class="XIUX.MainUI" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

我试图在Windows10上用WPF绘制标题栏。我的
WindowChrome
设置如下:

<Window x:Class="XIUX.MainUI"
        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:XIUX"
        mc:Ignorable="d" Background="Transparent"
        Height="580" Width="1050">
    <Window.Resources>
        <Style TargetType="{x:Type local:MainUI}">
            <Setter Property="WindowChrome.WindowChrome">
                <Setter.Value>
                    <WindowChrome NonClientFrameEdges="Left,Bottom,Right"/>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
</Window>

呈现此标题:

但是,正确的标题应该更高,如下所示:

<Window x:Class="XIUX.MainUI"
        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:XIUX"
        mc:Ignorable="d" Background="Transparent"
        Height="580" Width="1050">
    <Window.Resources>
        <Style TargetType="{x:Type local:MainUI}">
            <Setter Property="WindowChrome.WindowChrome">
                <Setter.Value>
                    <WindowChrome NonClientFrameEdges="Left,Bottom,Right"/>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
</Window>


这是某种新闻部问题吗?我该如何解决这个问题?

所以基本上你要找的就是这个问答: