WPF功能区:最大化窗口关闭屏幕

Sta*_*eff 8 .net c# wpf ribbon

我正在将该System.Windows.Controls.Ribbon库用于我的应用程序.一切都工作得非常好,除非我最大化窗口它开始离开屏幕.

我也注意到使用其他WPF应用程序但是当你使用RibbonWindow它时会变得更糟.

在此输入图像描述

这是我的源代码(我认为没什么好激动的):

<RibbonWindow 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Class="WpfApplication1.MainWindow"
        Title="TestWindow" Height="350" Width="525" Background="LightSteelBlue">

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

        <Ribbon Grid.Row="0">
            <RibbonTab x:Name="TestRibbon" Header="TestRibbon">
                <RibbonGroup>
                    <RibbonButton x:Name="TestButton" Label="Button" LargeImageSource="traffic_lights_green.png" />
                </RibbonGroup>
            </RibbonTab>
        </Ribbon>

        <ContentControl Grid.Row="1">
        </ContentControl>
    </Grid>
</RibbonWindow>
Run Code Online (Sandbox Code Playgroud)

有没有办法阻止窗口这样做?

Spe*_*evy 1

如果您还没有找到它,我想这可以解决您的问题。 系统菜单未正确显示。这似乎是 .net 4 实现特有的错误。