Changing visibility of tab within ContextualTabGroup while backstage is open

Ribbon for WPF Forum

Posted 11 years ago by Stefan Link
Version: 13.1.0583
Platform: .NET 4.5
Environment: Windows 8 (64-bit)
Avatar

When changing the visibility of a tab within a ContextualTabGroup to Collapsed while application is in backstage and then manually closing the backstage causes a rendering problem of the tab-group.
When changing the visibility within a command that automatically closes the backstage, the problem doesn’t occur.


Used the following code (Within a new project):

App.xaml.cs:

protected override void OnStartup(StartupEventArgs e)
{
    base.OnStartup(e);
 
    ThemesOfficeThemeCatalogRegistrar.Register();
    ThemesMetroThemeCatalogRegistrar.Register();
    RibbonThemeCatalogRegistrar.Register();
 
    ThemeManager.CurrentTheme = ThemeName.MetroWhite.ToString();
        }

 MainWindow.xaml:

<ribbon:RibbonWindow x:Class="WpfApplication1.MainWindow"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
                     IsGlassEnabled="False">
 
    <ribbon:Ribbon Name="Ribbon">
        <ribbon:Ribbon.ApplicationMenu>
            <ribbon:Backstage>
                <ribbon:BackstageTab Header="Test">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                        </Grid.RowDefinitions>
                        <ribbon:Button Grid.Row="0" Label="Hide second tab and close backstage manually"
                                       StaysOpenOnClick="True" Click="CollapseSecondTab" />
                        <ribbon:Button Grid.Row="1" Label="Hide second tab and close backstage automatically"
                                       StaysOpenOnClick="False" Click="CollapseSecondTab" />
                    </Grid>
                </ribbon:BackstageTab>
            </ribbon:Backstage>
        </ribbon:Ribbon.ApplicationMenu>
 
        <ribbon:Ribbon.ContextualTabGroups>
            <ribbon:ContextualTabGroup Label="Group" IsActive="True">
                <ribbon:Tab Label="Tab1"></ribbon:Tab>
                <ribbon:Tab Label="Tab2" Name="Tab2"></ribbon:Tab>
            </ribbon:ContextualTabGroup>
        </ribbon:Ribbon.ContextualTabGroups>
 
        <ribbon:Ribbon.Content>
            <ribbon:Button Label="Show second tab" Click="ShowSecondTab"></ribbon:Button>
        </ribbon:Ribbon.Content>
 
    </ribbon:Ribbon>
</ribbon:RibbonWindow>

 MainWindow.xaml.cs:

private void ShowSecondTab(object sender, ExecuteRoutedEventArgs e)
{
    Tab2.Visibility = Visibility.Visible;
}
 
private void CollapseSecondTab(object sender, ExecuteRoutedEventArgs e)
{
    Tab2.Visibility = Visibility.Collapsed;
}

 

To reproduce the problem make sure both tabs within the tab group are shown. -> Open the backstage -> Click "Hide second tab and close backstage manually"-button. -> Close the backstage.

Any suggestions, why this is happening and how to avoid/solve this problem?

Comments (1)

Answer - Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Stefan,

Thanks for reporting this.  We've fixed the bug for the upcoming 2013.2 version.


Actipro Software Support

The latest build of this product (v24.1.3) was released 28 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.