Open Backstage does not render when changing IsGlassEnabled property of RibbonWindow

Ribbon for WPF Forum

Posted 10 years ago by Detlef Peters - Software Architect, MID GmbH
Version: 13.2.0591
Platform: .NET 4.5
Environment: Windows 7 (64-bit)
Avatar

Hello Actipro,

while evaluating your current WPF Controls release, I found this out:

- Changing the theme from e.g. OfficeXYZ to MetroLight should set RibbonWindow.IsGlassEnabled from true to false, since Metro themes are designed for a non-glass Window. However, this does not happen automatically when setting ThemeManager.CurrentTheme, so I have to do it manually.

- But after changing RibbonWindow.IsGlassEnabled : when the Backstage is open, the Backstage will not render properly - you wil only see the Back Button in the top-left corner (when the theme is set to MetroLight) or nothing at all on a blank Ribbon (when th theme is set to OfficeXYZ). FYI: the Backstage will always be open when you provide the theme switching function with your Options dialog, which can usually be accessed from the Backstage

 

Could you please fix this? Apart from this bug, the release really looks great. Or must I always close the Backstage before accessing the Options dialog?

Best regards,

   Detlef Peters

Comments (4)

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

Hi Detlef,

Can you make a new simple sample project that shows this problem happening and email that to our support address?  Please reference this post and rename the .zip file extension so it doesn't get spam blocked.  Then when that comes in, we will take a look and see what we can do to help.  Thanks so much!


Actipro Software Support

Posted 10 years ago by Detlef Peters - Software Architect, MID GmbH
Avatar

Hi Actipro,

I don't think an extra sample program is needed.

You can see it in your own DocumentEditor sample from the sample browser. I know there is no GlassEnabled on/off switch on its Backstage, but you can force the mentioned effect e.g. with the "snoop" tool. Change the IsGlassEnabled Property of the RibbonWindow when the DocumentEditor's Backstage is open, and you will see what I mean.

 

Thanks in advance,

  Detlef Peters

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

Hi Detlef,

Themes are independent of whether you allow RibbonWindow to support glass so that's why you need to update RibbonWindow.IsGlassEnabled as appropriate.  I was able to repro the issue you see.  I believe the problem there is that as you change the glass enabled setting, the Window's Template is changing.  And that wipes out the adornment layer that the Backstage is in.  If I do this sort of code, I can work around it:

ThemeManager.CurrentTheme = "MetroLight";
this.IsGlassEnabled = false;
ribbon.IsApplicationMenuOpen = false;
this.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, (Action)(() => {
	ribbon.IsApplicationMenuOpen = true;
}));

We will put the close/reopen code in our RibbonWindow.OnTemplateChanged handler as well so that you won't have to do that in the next maintenance release. 


Actipro Software Support

Answer - Posted 10 years ago by Detlef Peters - Software Architect, MID GmbH
Avatar

Glad to hear that. Thanks a lot!

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

Add Comment

Please log in to a validated account to post comments.