Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Backstage Button doesn't close Backstage

In Office 2010 when a Backstage button is pressed the Backstage would automatically close. For example I have a Backstage with New, Open and Save buttons.

When I click on a button the Backstage is not being closed - I suppose that's not the correct behavior. How can I let Fluent-Ribbon handle the Backstage correct?

I'm using the current release 2.0 from november 2010 (http://fluent.codeplex.com/releases/view/55556).

like image 570
nyn3x Avatar asked Nov 04 '22 06:11

nyn3x


2 Answers

This seems to be a defect in the ribbon that is fixed in the latest version in sound control, but not yet in the latest released version.

For now you can work around this using the following

// During initialisation
myRibbon.Menu.AddHandler(PopupService.DismissPopupEvent, (DismissPopupEventHandler)OnPopupDismiss);

private void OnPopupDismiss(object sender, DismissPopupEventArgs e)
{
    var backstage = Menu as Backstage;
    if (backstage != null)
    {
        backstage.IsOpen = false;
    }
}
like image 170
Justin Avatar answered Nov 11 '22 16:11

Justin


In Ribbon.xml the attribute required is isDefinitive=""true"" not sure how Fluent-Ribbon handles that, but is should have the equivalent

like image 32
TFD Avatar answered Nov 11 '22 17:11

TFD