Ribbon Backstage not showing inside ElementHost

Ribbon for WPF Forum

Posted 7 years ago by keepITcool - Amsterdam
Version: 12.1.0560
Avatar

I'm trying to build a complex usercontrol which is intended to be hosted in an Office TaskPane. 
Tree: Excel/Custom Taskpane/Forms.UserControl/FormsIntegration.ElementHost/wpf.UserControl.

A  'non scenic layout' with an application menu DOES work as expected, but I can't get a Scenic Layout with a Backstage menu to work. When I press "File" tab nothing happens. When run in a wpf application the backstage menu is displayed fine, but not when run in an ElementHost.

Anyone ideas?  

Thanks, Jurgen

Comments (6)

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

Hi Jurgen,

The difference between a normal application menu and Backstage is that the application menu is displayed in a WPF popup, and Backstage is displayed in a WPF adorner layer.  So perhaps those adorner layers don't work within ElementHost, or perhaps it is working but you are running into WPF's z-order issues with interop content where interop content always renders on top of WPF content.  Unfortunately there is no way to change Backstage to appear in a different way.


Actipro Software Support

Posted 7 years ago by keepITcool - Amsterdam
Avatar

Not really an answer is it. It is an explanation of where / what to investigate, but no investigation is made.

Since all my other WPF works well (including adorners over passwordbox on the ribbin..., why not the BackStage?
Due to the elementhost the backstage will fail obtaining application or window  object.. which it probably needs to find rendering size...

There must be an event or override so I can have my usercontrol behave as intended: for use in either window or taskpane? Please point me in the right direction, instead of telling me to live with it.

 

Regards, Jurgen

[Modified 7 years ago]

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

Hi Jurgen,

We haven't tested it in an ElementHost.  It's worked fine in any pure WPF-based scenario we've tried though.  We'll be happy to take a look at this issue for you if you e-mail us a simple sample project showing the issue.  Please rename the .zip file extension so it doesn't get spam blocked and reference this post.


Actipro Software Support

Posted 7 years ago by keepITcool - Amsterdam
Avatar

...zipped, renamed and mailed as reply to notification mail...

Thanks for the attention, and let's hope you can come up with a fix.

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

Hi Jurgen,

Thanks for the sample.  We were able to get it working with a code change that will be in the next 2012.1 maintenance release.

One additional step is that in your UserControl, you'll need to wrap the root Grid with an AdornerDecorator.


Actipro Software Support

Posted 7 years ago by keepITcool - Amsterdam
Avatar

Fantastic!  

BTW I've found some small issues with the ribbon's ContextualTabs (not related to elementhost) .
I'll put those in a small project and mail it in later this week.

The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.