mixing with winforms

Ribbon for WPF Forum

Posted 16 years ago by Kelly Leahy - Software Architect, Milliman
Version: 3.0.0410
Avatar
We have a mixed application - it is using your UIStudio (WinForms) for a tabbed MDI interface with toolwindows and such, as well as using the SyntaxEditor. We also have one third party grid control that is WinForms. We are building all new custom controls using WPF and hosting them inside WPF Element Host (WF interop) controls.

I really like your other controls and would like to use the WPF ribbon in our UI as well, but we've had lots of problems where we've needed to be very careful not to 'overlap' WF and WPF controls due to the fact that WinForms controls don't participate in the WPF z-order. (you can see my blog about this if you're interested - it's at http://kleahy-technical.blogspot.com).

Anyway, my question is basically whether you think we could effectively use the WPF ribbon in place of our current toolbar infrastructure (newly rebuild to use your UIStudio controls) alongside non-WPF content (in particular, your tab controls).

The structure would be:
  • main application: WF
  • ribbon hosted in Element Host on WF mainform.
  • dock manager on WF mainform from UIStudio
  • tabs are WF user controls, some toolwindows are WF, some are WPF hosted in element hosts.
  • some of the WF user controls have dock manager on them, and those dock managers have some toolwindows that are WPF hosted in element hosts as well
It's a big mess of interop, i know, but it seems to be working so far (without a ribbon). I'm just trying to understand whether the ribbon will work, as it my potentially 'overlap' some of the winforms controls when it does it's dropdown items. Are those rendered using 'popup windows', or are they just highest in the z-order for the WPF drawing space?

I suspect this will work, because I suspect they must be some sort of popup window (since they also seem to work outside the bounds of the application window), but I'm not sure.

Kelly Leahy Software Architect Milliman, USA

Comments (3)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Wow that is a lot of interop! :) To be honest, we haven't done WPF in a Windows Forms app yet so I'm not sure what the ins-and-outs of doing that are. We have built a couple apps that are WPF apps and use Ribbon and SyntaxEditor in them though and that has worked ok.

I would imagine that would you are trying to do is ok. Almost all the popups in Ribbon are WPF Popup-based. The only exception I believe is when Ribbon is minimized and you show the minimized ribbon by clicking on a tab. That may be an issue with the z-order scenario you mentioned so be sure to check that out. Please let us know what you find. But other than that, everything is a WPF Popup and I imagine would show over Windows Forms controls ok.


Actipro Software Support

Posted 16 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
Yeah, it's a ton of interop...

Basically, we're stuck with it because we want to use two WF controls - SyntaxEditor and Infragistics' Grid. If we could use WPF versions of those, we'd be good to go "all WPF" and wouldn't have this problem.

Ok. I'll have to try the WPF ribbon sometime in our application and see if it will work our way.

Kelly Leahy Software Architect Milliman, USA

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We do plan on starting on a WPF SyntaxEditor soon after a couple other milestones so that will eventually be here. :)

Also if the minimized ribbon popup is an issue with the z-order, you can just disable that feature until you are totally on WPF too.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.