8

我正在System.Windows.Controls.Ribbon为我的应用程序使用该库。一切都很好,除了当我最大化窗口时它开始离开屏幕。

我还注意到,对于其他 WPF 应用程序,但是当您使用 aRibbonWindow时,情况会变得更糟。

在此处输入图像描述

这是我的源代码(我认为没有什么真正令人兴奋的):

<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>

有什么方法可以阻止窗口这样做吗?

4

2 回答 2

1

如果您还没有找到它,我认为这可能会回答您的问题。 systemmenu-does-not-show-correctly。它似乎是特定于 .net 4 实现的错误。

于 2012-10-11T10:17:36.993 回答
0

只是为了让你知道我是如何“解决”这个问题的。我正在使用 Fluent Ribbon api。这对我来说效果更好,您还可以获得 Office 2010 样式。

但我强烈建议您下载源代码并自行编译,因为上一个稳定版本是不久前发布的,但它仍在开发中,开发人员对错误的响应非常快。

http://fluent.codeplex.com/

于 2012-11-13T11:50:27.637 回答