Layout issue migrating 2010.1 -> 2010.2

Ribbon for WPF Forum

Posted 14 years ago by Cameron MacFarland - Senior Software Engineer, Orelogy Geotechnical
Version: 10.2.0533
Platform: .NET 3.5
Environment: Windows 7 (64-bit)
Avatar
Hi,

I have a somewhat unusual layout for the ribbon. On the right side of the ribbon is a section that is static regardless of which tab is selected. To achieve this we're using a grid with a ribbon, and a GroupPresenter to represent the two parts.

I've recently upgraded from 2010.1 to 2010.2 and now this layout doesn't work. Is it possible to get this behaviour back?

Here's a sample that demonstrates the problem. With 2010.1 it works fine, but with 2010.2 the second test group and button disappears.
partial class MainWindow
{
    public MainWindow()
    {
        InitializeComponent();

        ThemeManager.CurrentTheme = CommonThemeName.Office2007Black.ToString();
    }
}
<ribbon:RibbonWindow x:Class="APRibbonTest.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"
        xmlns:themes="http://schemas.actiprosoftware.com/winfx/xaml/themes"
        Title="MainWindow" Height="350" Width="525">
    <DockPanel>
        <Grid DockPanel.Dock="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <ribbon:Ribbon Grid.Column="0" UseScenicLayout="False">
                <ribbon:Ribbon.Tabs>
                    
                    <ribbon:Tab Label="Home">
                        <ribbon:Group Label="Test Group 1">
                            <ribbon:Button Label="Test Button 1" />
                        </ribbon:Group>
                    </ribbon:Tab>
                    
                </ribbon:Ribbon.Tabs>
            </ribbon:Ribbon>

            <ribbon:GroupPresenter Grid.Column="1">
                <ribbon:Group Label="Test Group 2">
                    <ribbon:Button Label="Test Button 2" />
                </ribbon:Group>
            </ribbon:GroupPresenter>

        </Grid>
        
        <Grid />
    </DockPanel>
</ribbon:RibbonWindow>

Comments (4)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Cameron,

Thanks for reporting this. It appears due to the Margin = 1 setter added in an implicit style to the Office 2007 themes, in contrast to the Margin = 0 that is the default for Office 2010 themes.

We've corrected this for the next version.


Actipro Software Support

Posted 14 years ago by Cameron MacFarland - Senior Software Engineer, Orelogy Geotechnical
Avatar
Ok, thanks.

In the meantime is there a way I can fix this? Perhaps overriding a style or something?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Maybe try to explcitly set the Group.Margin property to 0 to override the style setting it to 1.


Actipro Software Support

Posted 14 years ago by Cameron MacFarland - Senior Software Engineer, Orelogy Geotechnical
Avatar
That did it, thanks.
The latest build of this product (v24.1.3) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.