隐藏功能区的GUI bug

时间:2014-02-28 08:15:16

标签: c# .net wpf user-interface ribbon

我对Microsoft功能区库(包含在.Net Framework 4.5中的库)有一种奇怪的行为。如果我隐藏完整的功能区,功能区选项卡标题下方的区域看起来非常难看。我已经构建了一个测试应用程序并且能够重现这种行为(下面的屏幕)

enter image description here

此应用程序的代码非常简单:

<Window x:Class="RibbonLibraryTest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid Background="Yellow">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Ribbon Background="White">
            <RibbonTab Header="Test1"></RibbonTab>
            <RibbonTab Header="Test2"></RibbonTab>
            <RibbonTab Header="Test3"></RibbonTab>
            <RibbonTab Header="Test4"></RibbonTab>
        </Ribbon>
    </Grid>
</Window>

要隐藏功能区,我双击其中一个功能区选项卡,就像在MS Word中一样。 似乎是功能区库中的错误。有没有办法避免这种情况?

0 个答案:

没有答案
相关问题